Gateway Triggers
Create a gateway trigger
Creates a new gateway trigger for API endpoint management. A gateway trigger establishes an HTTP endpoint that can be accessed from outside the system and routes requests to appropriate handlers.
Usage Notes:
- The system automatically generates a unique topic for your gateway trigger
- Default timeout is 30 seconds (30000ms) if not specified
- Gateway mappings define the HTTP method, path, and access controls
- Setting is_public: true allows the endpoint to be accessed without authentication
- Rate limits can be configured per endpoint
- After creation, the gateway endpoint is immediately available for traffic
- The response includes the full subject identifier which may be needed for other operations
post/trigger/gateway
Request body
Example request
{
"name": "my-gateway-trigger",
"collection": "my-collection",
"description": "Trigger for API gateway endpoint",
"trigger_type": "gateway",
"gateway_mapping": {
"is_public": true,
"limit": {
"request": 1000,
"time": 1000
},
"method": "GET",
"path": "/api/resource",
"timeout": 30000,
"traffic_distribution": {
"1": 100
}
}
}Response
Gateway trigger created successfully
Example response
{
"body": {
"name": "my-gateway-trigger",
"collection": "my-collection",
"gateway_mapping_subject": "ms.trigger.gateway.123456",
"stream": "quiva-trigger-config",
"subject": "ms.trigger.gateway.my-gateway-trigger",
"trigger_type": "gateway",
"type": "gateway-trigger"
},
"status_code": 201
}