Fetch environment
GET
/api/v1/environment/{environment_id}
const url = 'https://app.prefactorai.com/api/v1/environment/013xrzp12g3nqk8ns6jadrqmpgrjkeny';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.prefactorai.com/api/v1/environment/013xrzp12g3nqk8ns6jadrqmpgrjkeny \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”environment_id
required
Environment_Id
A valid environment ID
string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyQuery Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Success
Media typeapplication/json
object
details
Environment_Details
status
string
Example
{ "details": { "account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "description": null, "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "name": "Development", "purpose": "development", "type": "environment" }, "status": "success"}default
Section titled “default”Error