Get Claim Mapping by ID
GET /environments/{env_id}/claim_mappings/{claim_mapping_id}
GET /environments/{env_id}/claim_mappings/{claim_mapping_id}Interactive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Path Parameters
Environment ID that scopes the request.
uuidClaim mapping ID within the environment.
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "$AISIX_CP/environments/$ENV_ID/claim_mappings/$CLAIM_MAPPING_ID" \ -H "Authorization: Bearer $AISIX_TOKEN"OK
{
"claim_mapping": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"env_id": "3f917d0d-4dff-42f3-97c4-6a5455dfe8c2",
"name": "string",
"jwt_provider": "string",
"priority": 0,
"match": [
{
"claim": "string",
"op": "exact",
"values": [
"string"
]
}
],
"resolve": {
"api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd"
},
"enabled": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
},
"warnings": [
{
"code": "field_ignored",
"field": "string",
"min_dp_version": "string",
"affected_dp_count": 0,
"affected_dp_versions": [
"string"
]
}
]
}Request body or parameters failed validation.
{
"error": {
"code": "string",
"message": "string"
}
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Resource not found.
{
"error": {
"code": "NOT_FOUND",
"message": "provider key not found"
}
}Complete operation details and schema variants
GET /environments/{env_id}/claim_mappings/{claim_mapping_id}
Get Claim Mapping by ID
Return one claim mapping. The mapping must belong to the environment in the request path.
Parameters
env_id(path, string, required): Environment ID that scopes the request.claim_mapping_id(path, string, required): Claim mapping ID within the environment.
Responses
-
200: OK -
claim_mapping(object, required): A rule resolving verified JWT claims to an existing caller API key. Evaluated only when no key binds the token's subject directly viajwt_subject. -
claim_mapping.id(string, required): Unique claim mapping ID. -
claim_mapping.env_id(string, required): Environment the mapping belongs to. -
claim_mapping.name(string, required): Human-readable mapping name, unique within the environment. Fixed at creation. -
claim_mapping.jwt_provider(string, required): Name of the OIDC provider whose tokens this mapping applies to. A mapping never matches a token verified by a different provider. -
claim_mapping.priority(integer, required): Evaluation order among the provider's mappings: lower values are evaluated first, ties are broken byname. -
claim_mapping.match(array, required): Claim conditions, all of which must hold for the mapping to match. -
claim_mapping.match[].claim(string, required): Claim to inspect. Dots traverse nested objects (for examplerealm_access.roles). A missing claim never matches. -
claim_mapping.match[].op(string, required): Comparison operator.exactrequires a string claim equal to one ofvalues;containsrequires an array claim containing one of them. A claim whose type does not fit the operator never matches. -
claim_mapping.match[].values(array, required): Accepted values; the condition holds when any one matches. -
claim_mapping.resolve(object, required): What a matched mapping resolves to. -
claim_mapping.resolve.api_key_id(string, required): ID of the API key the request runs as. The key's model and tool access, rate limits, and budget apply exactly as if the caller had presented the key itself. -
claim_mapping.enabled(boolean, required): Whether the mapping participates in evaluation. A disabled mapping is kept but skipped. -
claim_mapping.created_at(string, required): Creation timestamp. -
claim_mapping.updated_at(string, required): Last update timestamp. -
warnings(array, optional): Present on save operations when some data plane nodes in the environment run a gateway version that does not execute claim mappings at all — the saved rule has no effect there and matching tokens are rejected. Never present on reads. -
warnings[].code(string, required): How affected nodes treat the saved resource.field_ignored: the resource stays in service on those nodes but the named field has no effect there — beware when the field is restrictive, since the restriction is silently not enforced.row_rejected: those nodes refuse the whole resource, so it stops serving there entirely (or, if a previously accepted version exists, they keep serving the old values). -
warnings[].field(string, required): Dot-separated path of the field that triggered the warning, as delivered to gateway nodes. -
warnings[].min_dp_version(string, required): Oldest gateway version that fully executes the field. The literal valueunreleasedmeans no released gateway version executes it yet. -
warnings[].affected_dp_count(integer, required): Number of currently registered nodes in the environment running an older gateway version thanmin_dp_version. -
warnings[].affected_dp_versions(array, required): Distinct gateway versions reported by the affected nodes, capped at five entries. Nodes that report no version appear asunknown. -
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 toGET /environments/{env_id}/claim_mappings/{claim_mapping_id}, response 400 above. -
404: Resource not found. Response fields (application/json): identical toGET /environments/{env_id}/claim_mappings/{claim_mapping_id}, response 400 above.
cURL
curl -X GET '$AISIX_CP/environments/{env_id}/claim_mappings/{claim_mapping_id}' -H 'Authorization: Bearer $AISIX_TOKEN'