Your first request
1
Create a service account
In Strata Cloud Manager, go to System Settings > Identity & Access, select your tenant, and add an identity of type Service Account. Save the Client ID and Client Secret it issues, and note the tenant service group ID (TSG ID).Full walkthrough with roles and inheritance: Create a service account.
2
Request an access token
Exchange those three values for a token.
3
Call an endpoint
Send the token as a bearer token. Every endpoint takes the same header.The response lists the configs belonging to the organisation the token is scoped to. You do not send a tenant identifier on the request, because the token carries it.
4
Refresh before it expires
Tokens last 15 minutes, reported as
expires_in: 900 on the token response. Cache one for that window and refresh it shortly before it lapses.Base URLs
Which base URL an endpoint uses follows the resource, not the sidebar group it sits in.
The organisation guardrail endpoints carry their prefix in the path instead of the base URL, as
/admin/v2/guardrails against https://api.apps.paloaltonetworks.com/ai_gw. That resolves to the same place as the admin base above.
Each endpoint’s reference page states its server. Where the two disagree, trust the reference page, which is generated from the specification.
How resources are scoped
Every resource sits at one of two levels. Knowing which one you are addressing explains most403 responses.
The split matches the base URLs: organisation-level resources are served from the
admin/v2 base. API keys and limit policies span both levels, and POST /api-keys/{sub-type} takes the level from the calling token rather than from the path — sub-type chooses user or service, nothing more.
To reach a workspace-level resource, pass workspace_id as a query parameter on GET and list requests, and in the request body on POST and PUT. A workspace UUID or a slug both work.
Slugs and IDs
Mixing these up is a common cause of404.
- Slugs identify the resources you name yourself:
/configs/{slug},/integrations/{slug},/providers/{slug} - IDs identify the resources the gateway names for you:
/guardrails/{guardrailId},/mcp-servers/{mcpServerId},/policies/usage-limits/{policyUsageLimitsId},/api-keys/{id}
Guardrails sit at both levels
/guardrails manages the guardrails of a single workspace. /admin/v2/guardrails manages the organisation-wide ones, which apply to every workspace unless a workspace is explicitly excluded. See Enforcing Org Level Guardrails.
Common tasks
Each of these is a sequence of calls, not a single endpoint.Connect a model provider and provision it to a team
Connect a model provider and provision it to a team
POST /integrationscreates the integration and attaches the provider credentialPUT /integrations/{slug}/modelschooses which models it exposesPUT /integrations/{slug}/workspacesgrants the workspaces that may use it
Put an MCP server behind the gateway
Put an MCP server behind the gateway
POST /mcp-serversregisters the serverGET /mcp-servers/{mcpServerId}/capabilitiesreads the tools it advertisesPUT /mcp-servers/{mcpServerId}/capabilitiesenables only the tools you intend to exposePUT /mcp-servers/{mcpServerId}/user-accessdecides who may call itPOST /mcp-servers/{mcpServerId}/testconfirms the connection before anyone depends on it
Cap what a team can spend
Cap what a team can spend
POST /policies/usage-limitsdefines the budgetGET /policies/usage-limits/{policyUsageLimitsId}/entitiesshows what the policy currently binds toPUT /policies/usage-limits/{policyUsageLimitsId}/entities/{entityId}/resetclears consumption for one entity
/policies/rate-limits. Background in Budget Limits and Rate Limits.Issue and rotate an API key
Issue and rotate an API key
POST /api-keys/{sub-type}creates the key with the scopes it needs,userorservicePOST /api-keys/{id}/rotaterotates it on a schedule or on suspicion
Report on last month
Report on last month
GET /analytics/graphs/costreturns spend over timeGET /analytics/groups/ai-modelsbreaks it down by modelGET /analytics/groups/metadata/{metadataKey}breaks it down by whatever your requests tag themselves with
When a call fails
Every code the Admin API returns is listed on the Errors page.
Audit
Every administrative call is recorded with the principal that made it, the action, the target resource, a timestamp, an IP address and the request details. Automation is attributable to the service account that ran it, which is a good reason to give each one a name that says what it is for.Next
Authentication
Service accounts, access tokens, and how scope works across a TSG hierarchy
Errors
Every error code, with the usual cause
Audit Logs
The trail of every administrative change
Organisation Management
The same settings, configured from Strata Cloud Manager

