Ana içeriğe geç

List Global Policies

Endpoint

GET /apiops/projects/{projectName}/globalPolicies/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject 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

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarrayList of global policy descriptors
resultCountintegerTotal number of global policies returned

Global Policy Descriptor Fields

FieldTypeDescription
idstringInternal policy ID (name is the API reference)
namestringGlobal policy name (unique within the project)
policyTypestringThe _class discriminator of the policy (e.g. oidc-auth)
policyTypeLabelstringDisplay 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 successful
  • FAILURE - 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, policyType and policyTypeLabel are 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-group Excluded: Policy groups never appear in this list, even though they are internally a Policy subtype. Use List Policy Groups instead.
  • Empty List: If the project has no global policies, an empty resultList is returned with resultCount = 0.
  • Case Sensitivity: Project names are case-sensitive in path references; global policy name lookups on the other endpoints are case-insensitive.
  • Permission: Requires API_MANAGEMENT + VIEW in the project.