Ana içeriğe geç

List Environments of API Proxy Group

Endpoint​

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

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyGroupNamestringYesAPI Proxy Group name

Query Parameters​

None.

Response​

Success Response (200 OK)​

{
"status": "SUCCESS",
"resultList": [
{
"name": "production",
"type": "PRODUCTION",
"accessUrl": "https://api.example.com",
"deployed": true,
"redeployRequired": false
},
{
"name": "staging",
"type": "SANDBOX",
"accessUrl": "https://staging-api.example.com",
"deployed": true,
"redeployRequired": false
}
],
"resultCount": 2
}

Response Fields​

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarray[object]List of group deploy records
resultCountintegerTotal number of records

Environment Object (EnvironmentDTO)​

FieldTypeDescription
namestringEnvironment name
typestringEnvironment type (for example PRODUCTION, SANDBOX)
accessUrlstringEnvironment access URL (when available)
deployedbooleanWhether the group is currently deployed to this environment
redeployRequiredbooleanWhether a redeploy is required for this environment

Notes​

  • Returns entries from the group's deploy list (proxyGroupDeployList), not all project environments
  • Empty list ([]) is returned if the group has no deploy records
  • resultCount is 0 if no deploy records exist

Error Response (400 Bad Request)​

{
"status": "FAILURE",
"resultMessage": "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​

  • Deploy List:
    • Returns environments that have a deploy record for this group
    • Does not list every environment in the project

Permissions​

  • User must have any permission in the project (read access)