Skip to content

Agent Proxies

Agent proxy management operations

Create a new Agent proxy

POST /agent-proxies

Code samples

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

Creates an Agent proxy in the organization resolved from the access token. id is the public handle; when omitted the server derives it from displayName. protocol is required and immutable, and the matching named configuration block (a2a for protocol: a2a) is required alongside it.

Payload

{
  "id": "trip-planner",
  "displayName": "Trip Planning Agent",
  "description": "Plans multi-city trips end to end",
  "version": "v1.0",
  "projectId": "default",
  "context": "/default/trip-planner",
  "upstream": {
    "main": {
      "url": "https://agents.example.com/trip-planner",
      "auth": {
        "type": "api-key",
        "header": "X-API-Key",
        "value": "my-api-key-value"
      }
    }
  },
  "protocol": "a2a",
  "a2a": {
    "protocolVersion": "1.0",
    "operationConfigs": {
      "transports": [
        {
          "protocolBinding": "JSONRPC",
          "pathPrefix": "/rpc"
        },
        {
          "protocolBinding": "HTTP+JSON",
          "pathPrefix": "/rest"
        }
      ],
      "policies": [
        {
          "name": "api-key-auth",
          "version": "v1",
          "params": {
            "key": "API-Key",
            "in": "header"
          }
        }
      ],
      "operations": [
        {
          "name": "SendStreamingMessage",
          "resilience": {
            "idleTimeout": "2m"
          }
        }
      ]
    },
    "agentCard": {
      "public": {
        "mode": "passthrough",
        "rewriteUrls": true
      },
      "protected": {
        "mode": "passthrough",
        "rewriteUrls": true
      }
    }
  }
}

Authentication

Parameters

Name In Type Required Description
body body AgentProxy true Agent proxy to create

Example responses

201 Response

{
  "kind": "AgentProxy",
  "id": "trip-planner",
  "displayName": "Trip Planning Agent",
  "description": "Plans multi-city trips end to end",
  "version": "v1.0",
  "projectId": "default",
  "context": "/default/trip-planner",
  "upstream": {
    "main": {
      "url": "https://agents.example.com/trip-planner",
      "auth": {
        "type": "api-key",
        "header": "X-API-Key"
      }
    }
  },
  "protocol": "a2a",
  "a2a": {
    "protocolVersion": "1.0",
    "operationConfigs": {
      "transports": [
        {
          "protocolBinding": "JSONRPC",
          "pathPrefix": "/rpc"
        },
        {
          "protocolBinding": "HTTP+JSON",
          "pathPrefix": "/rest"
        }
      ],
      "policies": [
        {
          "name": "api-key-auth",
          "version": "v1",
          "params": {
            "key": "API-Key",
            "in": "header"
          }
        }
      ],
      "operations": [
        {
          "name": "SendStreamingMessage",
          "resilience": {
            "idleTimeout": "2m"
          }
        }
      ]
    },
    "agentCard": {
      "public": {
        "mode": "passthrough",
        "rewriteUrls": true
      },
      "protected": {
        "mode": "passthrough",
        "rewriteUrls": true
      }
    }
  },
  "createdBy": "john.doe",
  "updatedBy": "john.doe",
  "readOnly": false,
  "createdAt": "2026-10-19T09:15:22Z",
  "updatedAt": "2026-10-19T09:15:22Z"
}

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."
}

415 Response

{
  "status": "error",
  "code": "UNSUPPORTED_MEDIA_TYPE",
  "message": "This operation accepts application/json only."
}

500 Response

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

Responses

Status Meaning Description Schema
201 Created Agent proxy created successfully AgentProxy
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
409 Conflict Conflict. The request conflicts with the current state of the resource. Error
415 Unsupported Media Type Unsupported Media Type. The request body media type is not supported by this operation. Error
500 Internal Server Error Internal Server Error. Error

Response Headers

Status Header Type Format Description
201 Location string uri URL of the newly created resource.

List Agent proxies

GET /agent-proxies

Code samples

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

Lists the Agent proxies in the caller's organization. Items are the lightweight AgentProxyListItem projection; read an individual Agent proxy for the full resource, including its protocol configuration and any managed Agent Card content. The protocol and projectId filters, when supplied, are applied to both the returned page and pagination.total. Filtering by A2A protocol version is not supported.

Authentication

Parameters

Name In Type Required Description
protocol query string false Filter Agent proxies by communication protocol. Omit to list every protocol variant. An empty or unsupported value is rejected with 400. The filter applies to the returned page and to pagination.total alike, always within the authenticated organization.
projectId query string false Project ID consisting of the handle (unique slug identifier) of the Project whose Agent proxies should be returned. Omit to list Agent proxies across every project in the organization. An empty value is rejected with 400, and a handle that does not resolve to a project in the authenticated organization is rejected with 404. The filter applies to the returned page and to pagination.total alike.
limit query integer false Maximum number of items to return per page.
offset query integer false Zero-based index of the first item to return.
sortBy query string false Field to sort the collection by. An unrecognized value falls back to the default sort (createdAt).
sortOrder query string false Sort direction applied to sortBy.
query query string false Case-insensitive substring filter matched against the resource display name and id (handle).

Detailed descriptions

protocol: Filter Agent proxies by communication protocol. Omit to list every protocol variant. An empty or unsupported value is rejected with 400. The filter applies to the returned page and to pagination.total alike, always within the authenticated organization.

projectId: Project ID consisting of the handle (unique slug identifier) of the Project whose Agent proxies should be returned. Omit to list Agent proxies across every project in the organization. An empty value is rejected with 400, and a handle that does not resolve to a project in the authenticated organization is rejected with 404. The filter applies to the returned page and to pagination.total alike.

Enumerated Values

Parameter Value
protocol a2a
sortBy name
sortBy createdAt
sortOrder asc
sortOrder desc

Example responses

200 Response

{
  "count": 2,
  "list": [
    {
      "id": "weather-agent",
      "displayName": "Weather Agent",
      "description": "Provides forecasts and severe-weather alerts",
      "version": "v1.0",
      "projectId": "default-project",
      "protocol": "a2a",
      "context": "/weather",
      "vhost": "agents.gw.com",
      "createdBy": "john.doe",
      "updatedBy": "john.doe",
      "readOnly": false,
      "createdAt": "2026-01-31T10:30:00Z",
      "updatedAt": "2026-01-31T10: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."
}

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

Status Meaning Description Schema
200 OK List of Agent proxies AgentProxyListResponse
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error

Get an Agent proxy by unique identifier

GET /agent-proxies/{agentProxyId}

Code samples

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

Returns the full Agent proxy, including its typed protocol configuration and any managed Agent Card content.

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Example responses

200 Response

{
  "kind": "AgentProxy",
  "id": "trip-planner",
  "displayName": "Trip Planning Agent",
  "description": "Plans multi-city trips end to end",
  "version": "v1.0",
  "projectId": "default",
  "context": "/default/trip-planner",
  "upstream": {
    "main": {
      "url": "https://agents.example.com/trip-planner",
      "auth": {
        "type": "api-key",
        "header": "X-API-Key"
      }
    }
  },
  "protocol": "a2a",
  "a2a": {
    "protocolVersion": "1.0",
    "operationConfigs": {
      "transports": [
        {
          "protocolBinding": "JSONRPC",
          "pathPrefix": "/rpc"
        },
        {
          "protocolBinding": "HTTP+JSON",
          "pathPrefix": "/rest"
        }
      ],
      "policies": [
        {
          "name": "api-key-auth",
          "version": "v1",
          "params": {
            "key": "API-Key",
            "in": "header"
          }
        }
      ],
      "operations": [
        {
          "name": "SendStreamingMessage",
          "resilience": {
            "idleTimeout": "2m"
          }
        }
      ]
    },
    "agentCard": {
      "public": {
        "mode": "passthrough",
        "rewriteUrls": true
      },
      "protected": {
        "mode": "passthrough",
        "rewriteUrls": true
      }
    }
  },
  "createdBy": "john.doe",
  "updatedBy": "john.doe",
  "readOnly": false,
  "createdAt": "2026-10-19T09:15:22Z",
  "updatedAt": "2026-10-19T09:15:22Z"
}

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

Status Meaning Description Schema
200 OK Agent proxy details AgentProxy
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error

Replace an existing Agent proxy

PUT /agent-proxies/{agentProxyId}

Code samples

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

Full replacement of the writable Agent proxy configuration; idempotent. Omitted optional fields reset to their documented default or absence — omitting a2a.agentCard restores default card behaviour, omitting a2a.operationConfigs.policies or a2a.operationConfigs.operations clears those user additions, and omitting associatedGateways empties the association set (subject to the existing deployment-integrity checks). a2a.operationConfigs itself is required, since it carries the transports.

An omitted body id retains the path handle and is never regenerated; a body id that disagrees with the path is a 400. protocol is immutable — changing it is a 400. An omitted write-only credential value retains the stored credential for an unchanged auth configuration, and auth.type: none removes auth; an auth configuration that changes without complete credentials is rejected. There is no implicit PATCH behaviour.

For a gateway-originated Agent proxy (readOnly: true), only description and associatedGateways are replaced from the body; every other field keeps the value imported from the gateway, and readOnly in the body is ignored.

Payload

{
  "id": "trip-planner",
  "displayName": "Trip Planning Agent",
  "description": "Plans multi-city trips end to end",
  "version": "v1.0",
  "projectId": "default",
  "context": "/default/trip-planner",
  "upstream": {
    "main": {
      "url": "https://agents.example.com/trip-planner",
      "auth": {
        "type": "api-key",
        "header": "X-API-Key",
        "value": "my-api-key-value"
      }
    }
  },
  "protocol": "a2a",
  "a2a": {
    "protocolVersion": "1.0",
    "operationConfigs": {
      "transports": [
        {
          "protocolBinding": "JSONRPC",
          "pathPrefix": "/rpc"
        },
        {
          "protocolBinding": "HTTP+JSON",
          "pathPrefix": "/rest"
        }
      ],
      "policies": [
        {
          "name": "api-key-auth",
          "version": "v1",
          "params": {
            "key": "API-Key",
            "in": "header"
          }
        }
      ],
      "operations": [
        {
          "name": "SendStreamingMessage",
          "resilience": {
            "idleTimeout": "2m"
          }
        }
      ]
    },
    "agentCard": {
      "public": {
        "mode": "passthrough",
        "rewriteUrls": true
      },
      "protected": {
        "mode": "passthrough",
        "rewriteUrls": true
      }
    }
  }
}

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.
body body AgentProxy true Replacement Agent proxy configuration

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Example responses

200 Response

{
  "kind": "AgentProxy",
  "id": "trip-planner",
  "displayName": "Trip Planning Agent",
  "description": "Plans multi-city trips end to end",
  "version": "v1.0",
  "projectId": "default",
  "context": "/default/trip-planner",
  "upstream": {
    "main": {
      "url": "https://agents.example.com/trip-planner",
      "auth": {
        "type": "api-key",
        "header": "X-API-Key"
      }
    }
  },
  "protocol": "a2a",
  "a2a": {
    "protocolVersion": "1.0",
    "operationConfigs": {
      "transports": [
        {
          "protocolBinding": "JSONRPC",
          "pathPrefix": "/rpc"
        },
        {
          "protocolBinding": "HTTP+JSON",
          "pathPrefix": "/rest"
        }
      ],
      "policies": [
        {
          "name": "api-key-auth",
          "version": "v1",
          "params": {
            "key": "API-Key",
            "in": "header"
          }
        }
      ],
      "operations": [
        {
          "name": "SendStreamingMessage",
          "resilience": {
            "idleTimeout": "2m"
          }
        }
      ]
    },
    "agentCard": {
      "public": {
        "mode": "passthrough",
        "rewriteUrls": true
      },
      "protected": {
        "mode": "passthrough",
        "rewriteUrls": true
      }
    }
  },
  "createdBy": "john.doe",
  "updatedBy": "john.doe",
  "readOnly": false,
  "createdAt": "2026-10-19T09:15:22Z",
  "updatedAt": "2026-10-19T09:15:22Z"
}

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."
}

415 Response

{
  "status": "error",
  "code": "UNSUPPORTED_MEDIA_TYPE",
  "message": "This operation accepts application/json only."
}

500 Response

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

Responses

Status Meaning Description Schema
200 OK Agent proxy replaced successfully AgentProxy
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
409 Conflict Conflict. The request conflicts with the current state of the resource. Error
415 Unsupported Media Type Unsupported Media Type. The request body media type is not supported by this operation. Error
500 Internal Server Error Internal Server Error. Error

Delete an Agent proxy

DELETE /agent-proxies/{agentProxyId}

Code samples

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

Deletes the Agent proxy from the control plane and durably records the deletion event. Gateway cleanup converges asynchronously, so a 204 is not a promise that every gateway has already removed the routes.

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Example responses

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

Status Meaning Description Schema
204 No Content Agent proxy deleted successfully None
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error

Fetch an Agent Card for preview

POST /agent-proxies/fetch-agent-card

Code samples

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

Provide either url with optional auth, or agentProxyId alone to use the stored upstream URL and stored credentials. Combining agentProxyId with url or auth is rejected. The fetched card is returned for preview and is never persisted.

This operation has no side effects, so it is guarded by the read scope. Saving a fetched card as managed content is a separate Agent proxy update that places it under a2a.agentCard.public.content or a2a.agentCard.protected.content.

This is also the display path for a passthrough public Agent Card, which is not stored, so it runs on ordinary page views and not only during authoring. It issues a live outbound request: when the upstream is unreachable, times out, rejects the stored credentials, or returns something that is not a parsable Agent Card, the response is 503 with AGENT_PROXY_UPSTREAM_UNREACHABLE — distinct from 500, so a client can tell an unreachable agent from a control-plane failure and render the right state. A managed public card needs no call here; it is already in the Agent proxy resource.

Payload

{
  "url": "https://agent.example.com"
}

Authentication

Parameters

Name In Type Required Description
Cache-Control header string false Send no-cache to bypass the control plane's cached Agent Card result and force a live upstream fetch — the explicit "refresh" action in an authoring UI. Any other value, or omission, allows a cached result. Per RFC 9110 this affects freshness only; it never changes what is stored.
body body FetchAgentCardRequest true Either a direct url (with optional auth), or an agentProxyId to fetch using a stored Agent proxy's endpoint and credentials.

Detailed descriptions

Cache-Control: Send no-cache to bypass the control plane's cached Agent Card result and force a live upstream fetch — the explicit "refresh" action in an authoring UI. Any other value, or omission, allows a cached result. Per RFC 9110 this affects freshness only; it never changes what is stored.

Enumerated Values

Parameter Value
Cache-Control no-cache

Example responses

200 Response

{
  "name": "Trip Planning Agent",
  "description": "Plans multi-city trips end to end",
  "version": "1.0.0",
  "supportedInterfaces": [
    {
      "protocolBinding": "JSONRPC",
      "protocolVersion": "1.0",
      "url": "https://agents.example.com/trip-planner/rpc"
    },
    {
      "protocolBinding": "HTTP+JSON",
      "protocolVersion": "1.0",
      "url": "https://agents.example.com/trip-planner/rest"
    }
  ],
  "capabilities": {
    "streaming": true
  },
  "defaultInputModes": [
    "text/plain"
  ],
  "defaultOutputModes": [
    "text/plain"
  ],
  "skills": [
    {
      "id": "plan_trip",
      "name": "Plan a trip",
      "description": "Plans an itinerary for a destination and day count",
      "tags": [
        "travel"
      ]
    }
  ]
}

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."
}

415 Response

{
  "status": "error",
  "code": "UNSUPPORTED_MEDIA_TYPE",
  "message": "This operation accepts application/json only."
}

500 Response

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

503 Response

{
  "status": "error",
  "code": "AGENT_PROXY_UPSTREAM_UNREACHABLE",
  "message": "The control plane could not reach the upstream to fetch its Agent Card.",
  "trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses

Status Meaning Description Schema
200 OK Parsed, transient Agent Card preview. Possibly served from the control plane's short-lived cache — see Age. Freshness metadata is carried in headers, never injected into the body: the card document is free-form and is returned exactly as the upstream supplied it. AgentCardDocument
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
415 Unsupported Media Type Unsupported Media Type. The request body media type is not supported by this operation. Error
500 Internal Server Error Internal Server Error. Error
503 Service Unavailable Service Unavailable. The control plane could not reach the Agent proxy's upstream to retrieve its Agent Card — unreachable, timed out, credentials rejected, or an unparsable response. This describes the control plane's own reachability of the upstream: it is not a statement about whether a deployed gateway can serve the card, and it is not a deployment status. Failures are cached for a shorter interval than successes, so a persistently unreachable upstream is not re-contacted on every page view. A positive Age means this failure was served from that negative cache. Error

Response Headers

Status Header Type Format Description
200 Cache-Control string Freshness of an Agent Card fetch result, as max-age=<seconds>. The control plane caches the stored-handle form of the fetch for this long so routine page views do not each issue an outbound request. max-age=0 means caching is disabled.
200 Age integer Seconds since the control plane actually fetched this result from the upstream. 0 or absent means it was fetched during this request; a positive value means it was served from the cache. Present on a cached failure too, so a client can say how long the upstream has been unreachable.
503 Age integer Seconds since the control plane actually fetched this result from the upstream. 0 or absent means it was fetched during this request; a positive value means it was served from the cache. Present on a cached failure too, so a client can say how long the upstream has been unreachable.

Create an API key for an Agent proxy

POST /agent-proxies/{agentProxyId}/api-keys

Code samples

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

Creates an API key for the specified Agent proxy, with the same behavior as REST API keys. Omit apiKey to have the server generate one; the generated value is returned only in this response and can never be retrieved again. A supplied apiKey is registered as-is and is not echoed back. The key is hashed before storage and broadcast to the gateways the Agent proxy is deployed to; a gateway the Agent proxy is deployed to later receives it at deployment time.

id is optional and derived from displayName when omitted. If the identifier is already in use on this Agent proxy, a short random suffix is appended. The response's keyId and the Location header carry the identifier actually stored.

Payload

{
  "id": "production-key-01",
  "displayName": "Production API Key",
  "apiKey": "sk_example_1234567890abcdef",
  "externalRefId": "ext-ref-12345",
  "expiresAt": "2026-12-31T23:59:59Z",
  "expiresIn": {
    "duration": 30,
    "unit": "days"
  },
  "issuer": "api-platform-devportal"
}

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.
body body CreateAPIKeyRequest true API key creation request

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Example responses

201 Response

{
  "status": "success",
  "message": "API key created and broadcasted to gateways successfully",
  "keyId": "production-key-01",
  "apiKey": "sk_example_1234567890abcdef"
}

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."
}

413 Response

{
  "status": "error",
  "code": "PAYLOAD_TOO_LARGE",
  "message": "The uploaded file exceeds the maximum allowed size."
}

415 Response

{
  "status": "error",
  "code": "UNSUPPORTED_MEDIA_TYPE",
  "message": "This operation accepts application/json only."
}

500 Response

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

Responses

Status Meaning Description Schema
201 Created API key created successfully. Generated key material is returned only in this response. CreateAPIKeyResponse
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
413 Payload Too Large Payload Too Large. The uploaded file exceeds the maximum allowed size. Error
415 Unsupported Media Type Unsupported Media Type. The request body media type is not supported by this operation. Error
500 Internal Server Error Internal Server Error. Error

Response Headers

Status Header Type Format Description
201 Location string uri URL of the newly created resource.

List API keys for an Agent proxy

GET /agent-proxies/{agentProxyId}/api-keys

Code samples

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

Returns API-key metadata for the specified Agent proxy. Key material is never returned by this operation. Only keys the caller created are listed, unless the caller holds ap:api_key:all:manage, which lists every key on the Agent proxy.

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.
limit query integer false Maximum number of items to return per page.
offset query integer false Zero-based index of the first item to return.

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

Example responses

200 Response

{
  "list": [
    {
      "id": "string",
      "displayName": "string",
      "maskedApiKey": "string",
      "status": "active",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "john.doe",
      "updatedAt": "2019-08-24T14:15:22Z",
      "expiresAt": "2019-08-24T14:15:22Z",
      "issuer": "api-platform-devportal",
      "allowedTargets": "string"
    }
  ],
  "count": 0,
  "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."
}

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

Status Meaning Description Schema
200 OK API-key metadata list retrieved successfully. Key material is never returned. AgentProxyAPIKeyListResponse
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error

Update an API key for an Agent proxy

PUT /agent-proxies/{agentProxyId}/api-keys/{apiKeyId}

Code samples

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

Updates an existing API key for the specified Agent proxy, with the same behavior as REST API keys: the supplied apiKey value replaces the key material, is hashed before storage, and is broadcast to the gateways the Agent proxy is deployed to. Only the key's creator may update it, unless the caller holds ap:api_key:all:manage. The Agent proxy must be associated with at least one gateway; otherwise the update is refused with 503.

Payload

{
  "name": "production-key-01",
  "displayName": "Production API Key (Updated)",
  "apiKey": "sk_example_new1234567890abcdef",
  "externalRefId": "ext-ref-12345",
  "expiresAt": "2027-12-31T23:59:59Z",
  "expiresIn": {
    "duration": 30,
    "unit": "days"
  },
  "issuer": "api-platform-devportal"
}

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.
apiKeyId path string true API Key ID consisting of the name (unique identifier) of the API key.
body body UpdateAPIKeyRequest true API key update request

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

apiKeyId: API Key ID consisting of the name (unique identifier) of the API key.

Example responses

200 Response

{
  "status": "success",
  "message": "API key updated and broadcasted to gateways successfully",
  "keyId": "production-key-01"
}

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."
}

413 Response

{
  "status": "error",
  "code": "PAYLOAD_TOO_LARGE",
  "message": "The uploaded file exceeds the maximum allowed size."
}

415 Response

{
  "status": "error",
  "code": "UNSUPPORTED_MEDIA_TYPE",
  "message": "This operation accepts application/json only."
}

503 Response

{
  "status": "error",
  "code": "GATEWAY_CONNECTION_UNAVAILABLE",
  "message": "No gateway connections are currently available.",
  "trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

500 Response

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

Responses

Status Meaning Description Schema
200 OK API key updated successfully. Key material is not returned. UpdateAPIKeyResponse
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
413 Payload Too Large Payload Too Large. The uploaded file exceeds the maximum allowed size. Error
415 Unsupported Media Type Unsupported Media Type. The request body media type is not supported by this operation. Error
503 Service Unavailable Service Unavailable. No gateway connections are currently available to service this request. Error
500 Internal Server Error Internal Server Error. Error

Delete an API key for an Agent proxy

DELETE /agent-proxies/{agentProxyId}/api-keys/{apiKeyId}

Code samples

curl -X DELETE https://localhost:9243/api/v0.9/agent-proxies/{agentProxyId}/api-keys/{apiKeyId} \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Accept: application/json'

Deletes the API key from the control plane and records the deletion in the audit log. A revocation is then propagated to the gateways the Agent proxy is associated with through the existing gateway event mechanism, so a 204 confirms the control-plane deletion, not that every gateway has already dropped the key. An Agent proxy associated with no gateway has nothing to notify, and the key is still deleted. Only the key's creator may delete it, unless the caller holds ap:api_key:all:manage.

Authentication

Parameters

Name In Type Required Description
agentProxyId path string true Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.
apiKeyId path string true API Key ID consisting of the name (unique identifier) of the API key.

Detailed descriptions

agentProxyId: Agent Proxy ID consisting of the handle (unique slug identifier) of the Agent proxy.

apiKeyId: API Key ID consisting of the name (unique identifier) of the API key.

Example responses

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

Status Meaning Description Schema
204 No Content API key deleted successfully (no content) None
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error