API7 Docs

Update A2A Agent

PATCH /a2a_agents/{a2a_agent_id}

PATCH /a2a_agents/{a2a_agent_id}

Interactive request editor loads with JavaScript.

Authorization

BearerAdminToken
AuthorizationBearer <token>

Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.

In: header

Path Parameters

a2a_agent_id*string

A2A agent ID.

Formatuuid

Request Body

application/json

Partially update an A2A agent. Omitted fields stay unchanged; a supplied credential rotates the stored secret.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "$AISIX_CP/a2a_agents/$A2A_AGENT_ID" \  -H "Authorization: Bearer $AISIX_TOKEN" \  -H "Content-Type: application/json" \  -d '{}'

OK

{
  "a2a_agent": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "name": "string",
    "url": "http://example.com",
    "protocol_version": "1.0",
    "auth_type": "none",
    "timeout_ms": 1,
    "enabled": true,
    "allowed_environments": [
      "2f8fd63c-350f-4e43-9e38-47af879eaada"
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
Complete operation details and schema variants

PATCH /a2a_agents/{a2a_agent_id}

Update A2A Agent

Update selected A2A agent fields. A new secret rotates the stored credential.

Parameters

  • a2a_agent_id (path, string, required): A2A agent ID.

Request body

Content type: application/json

  • name (string, optional): Organization-unique name used as the URL path segment.

  • url (string, optional): Upstream A2A agent URL.

  • protocol_version (string, optional): A2A wire-format version.

  • auth_type (string, optional): How AISIX authenticates to the upstream agent.

  • secret (string, optional): New credential — bearer token or API key depending on the effective auth_type; write-only. Omitting it keeps the stored credential ONLY while the auth_type is unchanged: changing the auth_type to any credential-bearing type requires a fresh non-blank secret. When the auth_type resolves to none, the stored credential is cleared.

  • timeout_ms (integer, optional): Per-request timeout in milliseconds.

  • enabled (boolean, optional): Whether the agent is dispatched to the data plane.

  • allowed_environments (array, optional): Replacement list of environments this agent is exposed to.

Responses

  • 200: OK

  • a2a_agent (object, required): An upstream A2A (Agent-to-Agent) agent registered at the organization level and exposed to the environments listed in allowed_environments. The secret (bearer token or API key depending on auth_type) is write-only and never appears in this view.

  • a2a_agent.id (string, required): A2A agent ID.

  • a2a_agent.org_id (string, required): Organization ID that owns this A2A agent.

  • a2a_agent.name (string, required): Organization-unique name used as the URL path segment the agent is exposed under. Names may contain letters, digits, _, ., and -, but cannot start or end with a separator character.

  • a2a_agent.url (string, required): Upstream A2A agent URL.

  • a2a_agent.protocol_version (string, required): A2A wire-format version pinned for this agent.

  • a2a_agent.auth_type (string, required): How AISIX authenticates to the upstream agent. none = no credential; bearer = a bearer token supplied as secret; api_key = an API key supplied as secret and sent as the x-api-key header.

  • a2a_agent.timeout_ms (integer, optional): Per-request timeout in milliseconds. AISIX applies its default when this value is unset.

  • a2a_agent.enabled (boolean, required): Whether the agent is dispatched to the data plane.

  • a2a_agent.allowed_environments (array, required): Environment UUIDs this agent is projected to. Empty array = projected to no environment.

  • a2a_agent.created_at (string, required): Time when the A2A agent was created.

  • a2a_agent.updated_at (string, required): Time when the A2A agent was last updated.

  • 400: Request body or parameters failed validation.

  • error (object, required): Error details.

  • error.code (string, required): Machine-readable identifier. Examples: UNAUTHENTICATED, INVALID_REQUEST, MASTER_KEY_UNSET, INTERNAL.

  • error.message (string, required): Human-readable explanation; safe to surface to operators.

  • 401: Missing or invalid bearer. Response fields (application/json): identical to PATCH /a2a_agents/{a2a_agent_id}, response 400 above.

  • 403: Authenticated request is not permitted. Response fields (application/json): identical to PATCH /a2a_agents/{a2a_agent_id}, response 400 above.

  • 404: Resource not found. Response fields (application/json): identical to PATCH /a2a_agents/{a2a_agent_id}, response 400 above.

  • 409: Request conflicts with current resource state. Response fields (application/json): identical to PATCH /a2a_agents/{a2a_agent_id}, response 400 above.

cURL

curl -X PATCH '$AISIX_CP/a2a_agents/{a2a_agent_id}' -H 'Authorization: Bearer $AISIX_TOKEN'