Skip to main content

List Environments

note

This endpoint can only be accessed using an Admin Key.

List environments.

Endpoint
GET /v2/environments

Request

Query Params


This endpoint supports all of the query parameters specified in the Pagination & Sorting section. Supported values for the sortBy parameter are environmentId, name, and createdAt.


GET /v2/environments
curl "https://api.warrant.dev/v2/environments" \
-H "Authorization: ApiKey YOUR_KEY"

Response

200 OK
[
{
"environmentId": "prod",
"name": "Production"
},
{
"environmentId": "test",
"name": "Test"
},
{
"environmentId": "staging",
"name": "Staging"
},
{
"environmentId": "bob-dev",
"name": "Bob Development"
}
]