Delete an environment
DELETE
/v1/accounts/{account}/apps/{app}/environments/{environment}
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <credentials>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
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://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” account
required
string
Name of your WP Engine Headless Platform account
app
required
string
Name of your Headless Platform application
environment
required
string
ID of your environment
Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
Example generated
{}