List Environments
GET https://infrahub-api.nexgencloud.com/v1/core/environments
Returns a list of your existing environments, providing the following details for each; environment ID, name, region, and the date and time of creation. For more information on environments, click here
Query string parameters
search string or integer
optional
Search for the evironment name, ID, or region to retrieve it.
page integer
optional
The page number to retrieve environments from.
pageSize integer
optional
Specify the number of environments to return per page.
Attributes of the Environment object
status boolean
Indicates the success or failure of the operation. In this case, it is set to true
, indicating that the list of environments has been retrieved successfully.
message string
A message confirming the successful retrieval of the environments list.
environments array
An array of objects each containing details about an environment.
For descriptions of the fields within the environments
objects returned in response to your request, please refer to the documentation here.
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/environments" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
{
"status": true,
"message": "string",
"environments": [
{
"id": 0,
"name": "string",
"region": "string",
"created_at": "2024-01-10T09:17:00.618Z"
}
]
}
Returns
Returns an array of environments
objects, each providing details about an environment, including its name, ID, associated region, and creation date and time.