Ana içeriğe geç

List Policies

Endpoint​

GET /apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesAPI Proxy name

Query Parameters​

None

Response​

Success Response (200 OK)​

{
"status": "SUCCESS",
"resultList": [
{
"name": "Address",
"type": "SOAP",
"relativePath": "/address",
"soapToRest": false,
"requestPolicyList": [
{
"type": "policy-throttling",
"active": true
}
],
"responsePolicyList": [
{
"type": "policy-api-call",
"active": true
}
],
"errorPolicyList": [
{
"type": "policy-script",
"active": true
},
{
"type": "policy-script",
"description": "sample description",
"active": true
}
],
"endpointList": [
{
"endpoint": "/UpdateAddress",
"active": true,
"httpMethod": "POST",
"requestPolicyList": [
{
"type": "policy-script",
"active": true
}
]
}
]
}
],
"resultCount": 1
}

Response Fields​

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarrayList containing API proxy with policies
resultCountintegerTotal number of results (always 1)

API Proxy Object Fields​

FieldTypeDescription
namestringAPI Proxy name
typestringAPI type. See EnumApiType
relativePathstringRelative path (from clientRoute)
soapToRestbooleanWhether SOAP to REST transformation is enabled
requestPolicyListarrayList of request pipeline policies
responsePolicyListarrayList of response pipeline policies
errorPolicyListarrayList of error pipeline policies
endpointListarrayList of endpoints with their policies

Policy Object Fields​

Each item of the policy lists (requestPolicyList, responsePolicyList, errorPolicyList and the lists inside endpointList) carries the policy configuration of its type. These fields are present on every policy:

FieldTypeDescription
namestringPolicy name (read-only). On a write, the name in the path is used
typestringPolicy type
activebooleanWhether the policy is active
policyConditionobjectConditional-execution rule. See Policy Condition

You can send a policy from this response back with Update Policy. The condition is kept. A condition rule with the operator IS_EMPTY, IS_NOT_EMPTY, EXISTS_AND_EMPTY, IS_EXISTS or IS_NOT_EXISTS does not need secondValueSource.

EnumApiType​

  • REST - REST API
  • SOAP - SOAP API

EnumStatus​

  • SUCCESS - Operation successful
  • FAILURE - Operation failed

Error Response (401 Unauthorized)​

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

cURL Example​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/policies/" \
-H "Authorization: Bearer YOUR_TOKEN"

Full JSON Body Example​

This endpoint does not require a request body.

Permissions​

  • User must have any permission in the project (read access)
  • On an AI, MCP or A2A proxy, API_MANAGEMENT or AI_DEVELOPMENT with VIEW is accepted. Other proxy types need API_MANAGEMENT.

Notes and Warnings​

  • Proxy-Level and Method-Level: This endpoint returns both proxy-level policies (applying to all endpoints) and method-level policies (within each endpoint in the endpointList).
  • Policy Details: Policy details may be simplified in list responses. Use individual policy endpoints for full details.
  • Pipeline Organization: Policies are organized by pipeline (request, response, error).
  • Empty Lists: If no policies exist in a pipeline, an empty array is returned.