Ana içeriğe geç

List Policy Groups

Endpoint​

GET /apiops/projects/{projectName}/policyGroups/

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": "665f2a1c9b3e4a0012ab35aa",
"name": "standard-security-bundle",
"targetPipeline": "REQUEST"
},
{
"id": "665f2a1c9b3e4a0012ab35ab",
"name": "response-masking-bundle",
"targetPipeline": "RESPONSE"
}
],
"resultCount": 2
}

Response Fields​

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarrayList of policy group descriptors
resultCountintegerTotal number of policy groups returned

Policy Group Descriptor Fields​

FieldTypeDescription
idstringInternal policy group ID (name is the API reference)
namestringPolicy group name (unique within the project)
targetPipelinestringPipeline the group is bound to: REQUEST, RESPONSE or ERROR

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/policyGroups/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings​

  • Lightweight Listing: Only id, name and targetPipeline are returned — never the embedded policy list. Use Get Policy Group for a single group's descriptor; the embedded policies (and any of their secrets) are never returned by this API.
  • Empty List: If the project has no policy groups, an empty resultList is returned with resultCount = 0.
  • Case Sensitivity: Project names are case-sensitive in path references; policy group name lookups on the other endpoints are case-insensitive.
  • Permission: Requires API_MANAGEMENT + VIEW in the project.