Ana içeriğe geç

Discover A2A Skills for a Policy

Endpoint

POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/parse-skills/

Bridges the same "Discover / Reparse" action the Manager UI's policy editor exposes to a token-authenticated APIops call, so a CI/CD pipeline can preview an inline agent's skill catalog without a browser session. This is the policy-embedded counterpart of a Passthrough proxy's own discovery — see A2A Gateway. It is the exact A2A counterpart of Discover MCP Tools for a Policy.

Preview-only

Nothing is persisted. The policy's a2aAgent.discoveredSkills is unchanged by this call — it only returns what a live probe finds. To actually update the approved catalog, save the discovered skills back onto the policy through Update Policy.

Authentication

Requires a Personal API Access Token.

Permission: API_MANAGEMENT × MANAGE.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonNo (only needed when sending probeOverride)

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesAPI Proxy that owns the policy
policyNamestringYesName of an existing policy-ai-a2a-agent-call or policy-ai-a2a-agent-invoke policy on that proxy

Request Body

Optional. Omitted, the policy's persisted inline a2aAgent is probed as-is (its stored credentials are decrypted server-side for the probe only). Supplied, the given fields override the persisted ones for this probe — the same ABSENT-vs-EMPTY convention a policy update uses: an omitted secret field (bearerToken, clientSecret) is preserved from the persisted agent and never sent back blank.

Example — probe the persisted agent as-is

{}

Example — probe against a different endpoint for this call only

{
"endpoint": "https://agents-staging.partner.example.com/a2a",
"authScheme": "BEARER",
"bearerToken": "staging-only-token"
}

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"pinnedCatalogHash": "7ac1...4de9",
"parsedAt": "2026-08-09T10:15:00Z",
"resultList": [
{
"id": "translate",
"name": "Translate",
"description": "Translates text between languages",
"tags": ["language"]
}
],
"resultCount": 1
}

Response Fields

FieldTypeDescription
pinnedCatalogHashstringFingerprint of this probe's skill catalog — compare against the policy's currently persisted hash to see whether the live agent has drifted
parsedAtstringTimestamp of this probe
resultListarrayOne entry per discovered skill: id, name, description, tags

Error Response (400 Bad Request) — Wrong Policy Type

{
"status": "FAILURE",
"resultMessage": "Policy (name: my-policy) is not a PolicyAiA2aAgentCall/PolicyAiA2aAgentInvoke!"
}

Error Response (400 Bad Request) — Discovery Failure

Operational discovery failures (agent unreachable, agent-card fetch rejected, malformed response) are caller-actionable and returned as 400, not 500.

The card is looked for at the endpoint itself first and, if it isn't served there, at the standard discovery path below it (.../.well-known/agent-card.json). The error reported back is the one from the endpoint as configured, since that is the value to correct.

Error Response (401 Unauthorized)

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example

curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAgentProxy/policies/a2a-agent-call/parse-skills/" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions

  • User must have API_MANAGEMENT + MANAGE permission in the project

Notes and Warnings

  • Preview-only, on purpose. It never writes to the policy. To persist a fresh catalog, apply it through a normal policy update.
  • Widened auth vs. the Manager UI's own JWT-authenticated twin. The Manager UI calls the same underlying discovery through a JWT session gated by AI_DEVELOPMENT × MANAGE; this APIops bridge uses API_MANAGEMENT × MANAGE instead, consistent with every other write-capable APIops endpoint in this resource.