Delete an environment
DELETE
/api/v1/environment/{environment_id}
const url = 'https://app.prefactorai.com/api/v1/environment/013xrzp12g3nqk8ns6jadrqmpgrjkeny';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: 'null'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://app.prefactorai.com/api/v1/environment/013xrzp12g3nqk8ns6jadrqmpgrjkeny \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data nullAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”environment_id
required
Environment_Id
A valid environment ID
string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyRequest Body
Section titled “Request Body”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