Skip to main content
POST
/
trigger
/
gateway
Create a gateway trigger
curl --request POST \
  --url https://api.quiva.ai/trigger/gateway \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "my-gateway-trigger",
  "collection": "my-collection",
  "description": "Trigger for API gateway endpoint",
  "trigger_type": "gateway",
  "gateway_mapping": {
    "method": "GET",
    "path": "/api/resource",
    "is_public": true,
    "limit": {
      "request": 1000,
      "time": 1000
    },
    "timeout": 30000
  }
}
'
{
  "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": "created"
  },
  "status_code": 201
}

Authorizations

Authorization
string
header
required

JWT token for authentication. Required for all API operations to verify identity and access permissions.

Body

application/json
name
string
required

Unique name identifier for the trigger. Used to construct the trigger's topic and subject.

Example:

"my-gateway-trigger"

trigger_type
enum<string>
required

Must be 'gateway' for this endpoint. Determines the trigger's behavior and available properties.

Available options:
gateway
Example:

"gateway"

gateway_mapping
object
required
collection
string

Logical grouping the trigger belongs to. Used for organizing and filtering triggers.

Example:

"my-collection"

description
string

Human-readable description explaining the trigger's purpose and function.

Example:

"Trigger for API gateway endpoint"

Response

Gateway trigger created successfully

body
object
status_code
integer

HTTP status code indicating the result of the operation.

Example:

201