Environments
Use the Environments API to define incident groups based on incident properties such as source, severity, or alert data, allowing your team to focus on the incidents relevant to their role.
Environments
Authentication
All BigPanda APIs require Bearer Token Authorization in the call headers.
This API uses the User API Key type of Authorization token.
BigPanda recommends adding Authentication headers only in the secure tool you use to make API calls.
Environments requirements
Environment names must be unique.
If no filter is specified when creating an environment, all incidents will be included in the environment.
Example 96. Create an environment
curl --request POST \ --url https://api.bigpanda.io/resources/v2.0/environments \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Platform Team", "description": "Environment is owned by the Platform team.", "environment_group_id": "6696265c4c28e11e591e2cr36", "roles": [{ "id": "768abaae85f1e3ceb4d61n45", "name": "Admin" }], "read_only_roles": [{ "id": "668abaaf85f1e3ceb4d61nl7", "name": "Viewer (Read-only)" }], "filter": "region = AW*" }'
curl --request POST \ --url https://eu-api.bigpanda.io/resources/v2.0/environments \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Platform Team", "description": "Environment is owned by the Platform team.", "environment_group_id": "6696265c4c28e11e591e2cr36", "roles": [{ "id": "768abaae85f1e3ceb4d61n45", "name": "Admin" }], "read_only_roles": [{ "id": "668abaaf85f1e3ceb4d61nl7", "name": "Viewer (Read-only)" }], "filter": "region = AW*" }'
Example 97. Retrieve an environment by ID
curl --request GET \ --url https://api.bigpanda.io/resources/v2.0/environments/{id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
curl --request GET \ --url https://eu-api.bigpanda.io/resources/v2.0/environments{id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
Example 98. Retrieve all environments
curl --request GET \ --url https://api.bigpanda.io/resources/v2.0/environments \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
curl --request GET \ --url https://eu-api.bigpanda.io/resources/v2.0/environments \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
Example 99. Update environment
curl --request PATCH \ --url https://api.bigpanda.io/resources/v2.0/environments/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "UI Team", "description": "Environment is owned by the UI Team", "environment_group_id": "6696265c4c28e11e591e2mn6", "roles": [{ "key": "768abaae85f1e3ceb4d61m92", "name": "Admin" }], "read_only_roles": [{ "key": "668abaaf85f1e3ceb4d61mn6", "name": "Viewer (Read-only)" }], "filter": "region = AW*" }'
curl --request PATCH \ --url https://eu-api.bigpanda.io/resources/v2.0/environments/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "UI Team", "description": "Environment is owned by the UI Team", "environment_group_id": "6696265c4c28e11e591e2mn6", "roles": [{ "key": "768abaae85f1e3ceb4d61m92", "name": "Admin" }], "read_only_roles": [{ "key": "668abaaf85f1e3ceb4d61mn6", "name": "Viewer (Read-only)" }], "filter": "region = AW*" }'
Example 100. Delete environment
curl --request DELETE \ --url https://api.bigpanda.io/resources/v2.0/environments/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
curl --request DELETE \ --url https://eu-api.bigpanda.io/resources/v2.0/environments/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
Example 101. Create an environment group
curl --request POST \ --url https://api.bigpanda.io/resources/v2.0/environments-groups \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "EnvGroupName" }'
curl --request POST \ --url https://eu-api.bigpanda.io/resources/v2.0/environments-groups \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "EnvGroupName" }'
Example 102. Retrieve all environment groups
curl --request GET \ --url https://api.bigpanda.io/resources/v2.0/environments-groups \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
curl --request GET \ --url https://eu-api.bigpanda.io/resources/v2.0/environments-groups \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
Example 103. Update environment group
curl --request PUT \ --url https://api.bigpanda.io/resources/v2.0/environments-groups/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ { "name": "koko13372", "environment_ids": [ "66572522d88f17578d90ceb2", "665dd07429873a99abdf7543" ] }'
curl --request PUT \ --url https://eu-api.bigpanda.io/resources/v2.0/environments-groups/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json' \ --data '{ { "name": "koko13372", "isDefault": false, "environment_ids": [ "66572522d88f17578d90ceb2", "665dd07429873a99abdf7543" ] }'
Example 104. Delete environment group
curl --request DELETE \ --url https://api.bigpanda.io/resources/v2.0/environments-groups/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'
curl --request DELETE \ --url https://eu-api.bigpanda.io/resources/v2.0/environments-groups/${id} \ --header 'Authorization: Bearer <User API Key>' \ --header 'Content-Type: application/json'