Environment APIs
These are the sevices used to list the environments on Apinizer.
1.Get All Environments
After successful access to this service, the environments in Apinizer are listed with their status and access addresses.
The "Admin" user role is required to access the services.
Endpoint: https://<management_app_url>/apiops/environments/
HTTP Method: GET
Request Headers:
Header | Value |
---|---|
Authorization | Bearer < Token > Tokens are required to access this endpoint. For detailed information on how to get tokens, you can visit the Authorization API page. |
Accept | application/json |
Request Body: (none)
Response:
Status | Status Code | Description | Body |
---|---|---|---|
Success | 200 | successful operation | { |
Error | 400 | bad request | { "error": "...", "error_description": "..." } |
Error | 401 | not authorized for this operation | { |
Error | 500 | internal error | { "error": "...", "error_description": "..." } |
2.Get all environments reachable from Project
Apinizer environments that can be accessed for deploy/undeploy operations through the Project sent as a parameter after successful access are listed.
The user must have any role in the desired project, to access this service,
Endpoint: https://<management_app_url>/apiops/environments/{projectName}
HTTP Method: GET
Request Headers:
Header | Value |
---|---|
Authorization | Bearer < Token > Tokens are required to access this endpoint. For detailed information on how to get tokens, you can visit the Authorization API page. |
Accept | application/json |
Request Path Parameters:
Parameter | Value |
---|---|
projectName | The full name of the project to be queried |
Request Body: (none)
Response:
Status | Status Code | Description | Body |
---|---|---|---|
Success | 200 | successful operation | { |
Error | 400 | bad request | { "error": "...", "error_description": "..." } |
Error | 401 | not authorized for this operation | { |
Error | 500 | internal error | { "error": "...", "error_description": "..." } |