Delete a hierarchy node
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes/{id}Authentication
- Bearer Token
AuthorizationJWT access token
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
id | string |
Headers
if-matchrequiredIf-MatchOptimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since.
Code samples
curl -X DELETE "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes/value" \
-H "if-match: value" \
-H "If-Match: value" \
-H "Authorization: Bearer $CANOPY_TOKEN"const response = await fetch("https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes/value", {
method: "DELETE",
headers: {
"if-match": "value",
"If-Match": "value",
"Authorization": "Bearer $CANOPY_TOKEN"
},
});
const data = await response.json();import requests
response = requests.delete(
"https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes/value",
headers={
"if-match": "value",
"If-Match": "value",
"Authorization": "Bearer $CANOPY_TOKEN"
},
)
data = response.json()package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes/value", nil)
req.Header.Set("if-match", "value")
req.Header.Set("If-Match", "value")
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
204 Node deleted successfully
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)
404 Node not found
409 Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry.