List Environments of API Proxy Group

Overview

Retrieves all environments where an API Proxy Group can be deployed or is already deployed. This endpoint shows the deployment status of the API Proxy Group.

Endpoint

GET /apiops/projects/{projectName}/apiProxyGroups/{apiProxyGroupName}/environments/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

Header Value Required
Authorization Bearer {token} Yes

Path Parameters

Parameter Type Required Description
projectName string Yes Project name
apiProxyGroupName string Yes API Proxy Group name

Query Parameters

None.

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "environmentName": "production",
      "deployed": true
    },
    {
      "environmentName": "staging",
      "deployed": true
    },
    {
      "environmentName": "development",
      "deployed": false
    }
  ],
  "resultCount": 3
}

Response Fields

Field Type Description
success boolean Indicates if the request was successful
resultList array[object] List of environments
resultCount integer Total number of environments

Environment Object

Field Type Description
environmentName string Environment name
deployed boolean Whether the API Proxy Group is deployed to this environment

Notes

  • Returns environments where the group is deployed
  • Empty list ([]) is returned if group is not deployed to any environment
  • resultCount is 0 if no deployments exist

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "API Proxy Group (PaymentAPIGroup) is not found or user does not have privilege to access it!"
}

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxyGroups/PaymentAPIGroup/environments/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Deployment Status:
    • Shows only environments where group is deployed
    • Does not show all available environments
  • Permissions:
    • Requires ROLE_MANAGE_PROXY_GROUPS permission
    • User must have access to the project