DataPower Nano Gateway API assembly policies

Use the DataPower Nano Gateway assembly policies in your API assembly to control the API's behavior.

The DataPower Nano Gateway uses a different set of API assembly policies from the DataPower® API Gateway.

Restriction: DataPower Nano Gateway and DataPower API Gateway are not compatible because they are designed for different purposes.

You cannot use an API with both gateway types, you cannot use commands or policies that are designed for one gateway type with the other gateway, and you cannot migrate APIs between gateways. When you develop APIs, you incorporate assembly policies that are designed for that type of gateway. When you package an API in a product, the product specifies which type of gateway is used for processing the API.

Assembly policies determine how an API behaves. The DataPower Nano Gateway supports the following assembly policies.

Note: All the policies that are listed in the following table are objects and are required.
Table 1. Table 1. Assembly policies
Policy Details
Authenticate Authenticate request based on extracted identity
Authorize Authorize access for an authenticated request
AzureOpenAiChatCompletions API Endpoint call for Azure Open AI backend server, POST Chat Completions URI
AzureOpenAiEmbeddings API Endpoint call for Azure Open AI backend server, POST Embeddings URI
AzureOpenAiModels API Endpoint call for Azure Open AI backend server, GET Models URI
AzureOpenAiModelsId API Endpoint call for Azure Open AI backend server, GET Models/{model_id} URI
Block Block a request based on configured criteria
Cache Cache a set of specified items from the context, given a set of specified input identifiers
CircuitBreaker Run an execute, count concurrency or failures. If limits are exceeded then run a fallback execute
SetAuthorization Sets the Authorization header
Cors Configure gateway support for CORS (Cross-Origin Resource Sharing)
CountLimit Enforce simultaneous access to resources
ExtractIdentity Extract the identity
HandlebarsTemplate Generate String value or payload using Handlerbars template
IbmCloudLogin Login to IBM Cloud using pre-configured credentials
If Run an execute block if a condition is met
Invoke Call an external endpoint (Currently Http(s))
InvokeAwsLambda Invoke AWS lambda function
LoadBalancer Distribute traffic across multiple endpoints
LuaScript Run LuaScript code
OpenAiChatCompletions API Endpoint call for Open AI backend server, POST Chat Completions URI
OpenAiEmbeddings API Endpoint call for Open AI backend server, POST Embeddings URI
OpenAiModels API Endpoint call for Open AI backend server, GET Models URI
OpenAiModelsId API Endpoint call for Open AI backend server, GET Models/{model_id} URI
OperationSwitch Execute a series of policies conditioned on API path and/or verb
Or Run a single action or an execute, if it fails run the next in a list until success
Parse Parse the payload of a message
RateLimit Limit the rate of access to a specified resource
RetryIterator Run an execute block, catch specified errors and retry up to a specified number of times the same execute block.
Return Complete execution of an assembly earlier with the success result
Redact Redact message payload, header, variable, query parameters, and telemetry
Remove Remove message payload, header, variable, query parameters, and telemetry
Set Set specified fields on the Assembly Context
SqlInjectionFilter Scans payload and/or URI for SQL injection attacks
Transform Transform message payload, header, variable, uri, and telemetry
Switch Run the first assembly that matched the given expressions
Throw Complete execution of an assembly with an error result
Try Create a block of assembly actions, containing catch block to handle errors during their execution and finally to unconditionally execute actions after the block
UserDefined Call into an assembly defined as a separate ConfigMap
Validate Validate request
WatsonxModels API Endpoint call for Watson X backend server, GET Models URI
WatsonxTextGen API Endpoint call for Watson X backend server, POST Text Generation URI
WatsonxTokenize API Endpoint call for Watson X backend server, POST Tokenize URI
GeminiModels API Endpoint call for Gemini backend server, GET Models URI
GeminiModelsId API Endpoint call for Gemini backend server, GET Models/{model_id} URI
GeminiGenerateContent API Endpoint call for Gemini backend server, POST Generate Content URI
GeminiEmbedContent API Endpoint call for Gemini backend server, POST Embeddings URI
GeminiBatchEmbedContents API Endpoint call for Gemini backend server, POST Batch Embeddings URI
GeminiCountTokens API Endpoint call for Gemini backend server, POST Count Tokens URI