Skip to content

Fetch environment

GET
/api/v1/environment/{environment_id}
curl --request GET \
--url https://app.prefactorai.com/api/v1/environment/013xrzp12g3nqk8ns6jadrqmpgrjkeny \
--header 'Authorization: Bearer <token>'
environment_id
required
Environment_Id

A valid environment ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
idempotency_key
One of:

Optional idempotency key for ensuring request idempotency

string

Success

Media typeapplication/json
object
details
required
Environment_Details
object
account_id
required
Account_Id

A valid account ID

string
description
required
One of:

Optional free-form description

string
external_identifier
required
One of:

External identifier for this environment in an external system (unique per account)

string
id
required
Environment_Id

A valid environment ID

string
name
required

Environment name

string
purpose
required

Environment purpose

string
Allowed values: development staging testing production
type
required

Type of resource (always ‘environment’)

string
Allowed values: environment
status
required
string
Allowed values: success
Example
{
"details": {
"account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"description": null,
"external_identifier": "env-abc123",
"id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"name": "Development",
"purpose": "development",
"type": "environment"
},
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
required
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used temporarily_unavailable conflict
message
required
string
status
required
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}