List Global Policies
Endpoint
GET /apiops/projects/{projectName}/globalPolicies/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
Query Parameters
None
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"resultList": [
{
"id": "665f2a1c9b3e4a0012ab34cd",
"name": "oidc-google-sso",
"policyType": "oidc-auth",
"policyTypeLabel": "oidc-auth"
},
{
"id": "665f2a1c9b3e4a0012ab34ce",
"name": "backend-ws-security",
"policyType": "policy-ws-security-username",
"policyTypeLabel": "policy-ws-security-username"
}
],
"resultCount": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | List of global policy descriptors |
| resultCount | integer | Total number of global policies returned |
Global Policy Descriptor Fields
| Field | Type | Description |
|---|---|---|
| id | string | Internal policy ID (name is the API reference) |
| name | string | Global policy name (unique within the project) |
| policyType | string | The _class discriminator of the policy (e.g. oidc-auth) |
| policyTypeLabel | string | Display label for the policy type. In the current implementation this is resolved from the same enum as policyType and is identical to it |
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Project (MyProject) is not found!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/globalPolicies/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Lightweight Listing: Only
id,name,policyTypeandpolicyTypeLabelare returned — never the full policy body. Use Get Global Policy for a single policy's descriptor; the full body is never returned by this API. policy-groupExcluded: Policy groups never appear in this list, even though they are internally aPolicysubtype. Use List Policy Groups instead.- Empty List: If the project has no global policies, an empty
resultListis returned withresultCount=0. - Case Sensitivity: Project names are case-sensitive in path references; global policy
namelookups on the other endpoints are case-insensitive. - Permission: Requires
API_MANAGEMENT+VIEWin the project.
Related Documentation
- Get Global Policy - Retrieve a single global policy by name
- Create Global Policy - Create a new global policy
- Global Policies API - Resource overview