Skip to main content

Retrieve Environment Details

GET https://infrahub-api.nexgencloud.com/v1/core/environments/{id}

Retrieves details on a specified environment. Supply the environment ID in the path, and Infrahub will return the corresponding environment object containing details on the environment.


Path parameters


id integer   Required

The unique identifier of the environment for which to retrieve details.


Attributes


status boolean

Indicates the result of the request to retrieve environment details. true signifies success, while false indicates an encountered error.


message string

A description of the status of the request.


environment object

An object containing details about the specified environment.

For descriptions of the fields within the environment object returned in response to your request, please refer to the documentation here.

Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/environments/{id}" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
Response
{
"status": true,
"message": "string",
"environment": {
"id": 0,
"name": "string",
"region": "string",
"created_at": "1970-01-01T00:00:00.000Z"
}
}

Returns


Returns an environment object containing details on the specified environment. If details on the specified environment are not retrieved, an error will be returned.


Back to top