Skip to main content

Platform API: Gateways

Gateway registration and management operations

Register a new gateway​

POST /gateways

Code samples


curl -X POST https://localhost:9243/api/v0.9/gateways \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Creates a new gateway within the organization specified in the JWT token. Organization ID is automatically extracted from the token and does not need to be provided.

Payload

{
"id": "prod-gateway-01",
"displayName": "Production Gateway 01",
"description": "Production gateway for handling API traffic",
"endpoints": [
"https://api.example.com:8443/api/v1",
"wss://events.example.com:8444"
],
"isCritical": true,
"functionalityType": "regular",
"properties": {
"region": "us-west",
"tier": "premium"
},
"version": "1.0"
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:gateway:create`, `ap:gateway:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyCreateGatewayRequesttrueGateway registration details

Example responses

201 Response

{
"id": "prod-gateway-01",
"organizationId": "acme",
"displayName": "Production Gateway 01",
"description": "Production gateway for handling API traffic",
"properties": {
"region": "us-west",
"tier": "premium"
},
"endpoints": [
"https://api.example.com:8443/api/v1",
"wss://events.example.com:8444"
],
"isCritical": true,
"functionalityType": "regular",
"version": "1.0",
"isActive": true,
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2025-10-14T10:30:00Z",
"updatedAt": "2025-10-14T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
201CreatedGateway registered successfullyGatewayResponse
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
409ConflictConflict. The request conflicts with the current state of the resource.Error
500Internal Server ErrorInternal Server Error.Error

Response Headers​

StatusHeaderTypeFormatDescription
201LocationstringuriURL of the newly created resource.

List all gateways​

GET /gateways

Code samples


curl -X GET https://localhost:9243/api/v0.9/gateways \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves a list of all registered gateways for the organization specified in the JWT token. Organization ID is automatically extracted from the token.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:gateway:read`, `ap:gateway:manage`

Parameters​

NameInTypeRequiredDescription
limitqueryintegerfalseMaximum number of items to return per page.
offsetqueryintegerfalseZero-based index of the first item to return.
sortByquerystringfalseField to sort the collection by. An unrecognized value falls back to the default sort (createdAt).
sortOrderquerystringfalseSort direction applied to sortBy.
queryquerystringfalseCase-insensitive substring filter matched against the resource id (handle).

Enumerated Values​

ParameterValue
sortByname
sortBycreatedAt
sortOrderasc
sortOrderdesc

Example responses

200 Response

{
"count": 2,
"list": [
{
"id": "prod-gateway-01",
"organizationId": "acme",
"displayName": "Production Gateway 01",
"description": "Production gateway for handling API traffic",
"properties": {
"region": "us-west",
"tier": "premium"
},
"endpoints": [
"https://api.example.com:8443/api/v1",
"wss://events.example.com:8444"
],
"isCritical": true,
"functionalityType": "regular",
"version": "1.0",
"isActive": true,
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2025-10-14T10:30:00Z",
"updatedAt": "2025-10-14T10:30:00Z"
}
],
"pagination": {
"total": 10,
"offset": 0,
"limit": 10
}
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKGateways retrieved successfullyGatewayListResponse
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
500Internal Server ErrorInternal Server Error.Error

Get gateway by ID​

GET /gateways/{gatewayId}

Code samples


curl -X GET https://localhost:9243/api/v0.9/gateways/{gatewayId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves a specific gateway by its ID (handle). Access is validated against the organization in the JWT token.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:gateway:read`, `ap:gateway:manage`

Parameters​

NameInTypeRequiredDescription
gatewayIdpathstringtrueGateway ID consisting of the handle (unique slug identifier) of the Gateway.

Detailed descriptions​

gatewayId: Gateway ID consisting of the handle (unique slug identifier) of the Gateway.

Example responses

200 Response

{
"id": "prod-gateway-01",
"organizationId": "acme",
"displayName": "Production Gateway 01",
"description": "Production gateway for handling API traffic",
"properties": {
"region": "us-west",
"tier": "premium"
},
"endpoints": [
"https://api.example.com:8443/api/v1",
"wss://events.example.com:8444"
],
"isCritical": true,
"functionalityType": "regular",
"version": "1.0",
"isActive": true,
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2025-10-14T10:30:00Z",
"updatedAt": "2025-10-14T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKGateway retrieved successfullyGatewayResponse
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Update gateway​

PUT /gateways/{gatewayId}

Code samples


curl -X PUT https://localhost:9243/api/v0.9/gateways/{gatewayId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Updates an existing gateway's mutable fields (description). Access is validated against the organization in the JWT token.

Payload

{
"organizationId": "acme",
"displayName": "Production Gateway 01",
"description": "Production gateway for handling API traffic",
"properties": {
"region": "us-west",
"tier": "premium"
},
"endpoints": [
"https://api.example.com:8443/api/v1",
"wss://events.example.com:8444"
],
"isCritical": true,
"functionalityType": "regular",
"version": "1.0",
"isActive": true,
"createdAt": "2025-10-14T10:30:00Z",
"updatedAt": "2025-10-14T10:30:00Z"
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:gateway:update`, `ap:gateway:manage`

Parameters​

NameInTypeRequiredDescription
gatewayIdpathstringtrueGateway ID consisting of the handle (unique slug identifier) of the Gateway.
bodybodyGatewayResponsetrueGateway object that needs to be updated

Detailed descriptions​

gatewayId: Gateway ID consisting of the handle (unique slug identifier) of the Gateway.

Example responses

200 Response

{
"id": "prod-gateway-01",
"organizationId": "acme",
"displayName": "Production Gateway 01",
"description": "Production gateway for handling API traffic",
"properties": {
"region": "us-west",
"tier": "premium"
},
"endpoints": [
"https://api.example.com:8443/api/v1",
"wss://events.example.com:8444"
],
"isCritical": true,
"functionalityType": "regular",
"version": "1.0",
"isActive": true,
"createdBy": "john.doe",
"updatedBy": "john.doe",
"createdAt": "2025-10-14T10:30:00Z",
"updatedAt": "2025-10-14T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKGateway updated successfullyGatewayResponse
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Delete gateway​

DELETE /gateways/{gatewayId}

Code samples


curl -X DELETE https://localhost:9243/api/v0.9/gateways/{gatewayId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Permanently deletes a gateway and all associated tokens (CASCADE). Deletion is blocked if the gateway has active API deployments or WebSocket connections. Access is validated against the organization in the JWT token.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:gateway:delete`, `ap:gateway:manage`

Parameters​

NameInTypeRequiredDescription
gatewayIdpathstringtrueGateway ID consisting of the handle (unique slug identifier) of the Gateway.

Detailed descriptions​

gatewayId: Gateway ID consisting of the handle (unique slug identifier) of the Gateway.

Example responses

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
204No ContentGateway deleted successfullyNone
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
409ConflictConflict. The request conflicts with the current state of the resource.Error
500Internal Server ErrorInternal Server Error.Error

Get gateway policy manifest​

GET /gateways/{gatewayId}/manifest

Code samples


curl -X GET https://localhost:9243/api/v0.9/gateways/{gatewayId}/manifest \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Returns the policy manifest for the specified gateway. The manifest is populated by the gateway controller when it connects to the platform API, and contains all installed policies. Custom policies additionally include their full policy definition schema.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:gateway:manifest:read`, `ap:gateway:manage`

Parameters​

NameInTypeRequiredDescription
gatewayIdpathstringtrueGateway ID consisting of the handle (unique slug identifier) of the Gateway.

Detailed descriptions​

gatewayId: Gateway ID consisting of the handle (unique slug identifier) of the Gateway.

Example responses

200 Response

{
"policies": [
{
"name": "set-wso2-headers",
"version": "v0.8.0",
"description": "Sets WSO2-specific headers in the request and response.",
"isCustomPolicy": true,
"policyDefinition": {}
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKGateway policy manifestManifestSyncResponse
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Was this page helpful?