Delete a machine instance and any transitions, state, or pending upgrades associated with it.
Delete a machine instance and any transitions, state, or pending upgrades associated with it.
THIS IS OBVIOUSLY A DANGEROUS OPERATION AND WILL INTENTIONALLY CAUSE DATA LOSS
All historical transitions associated with the machine and all current state and context will be deleted.
There is no option to recover data after an instance is deleted.
To prevent accidental deletion, we require two validation parameters:
- hmacSha256OfMachineInstanceNameWithMachineNameKey -
base64urlEncode(hmacSha256(key = "machine name", "machine instance name"))
- dangerDataWillBeDeletedForever - true
A 400 error with the parameter
set to the name of the incorrect parameter will be returned
if the validation parameters are incorrect.
This endpoint requires admin access.
Path parameters
-
The slug/name for the machine definition to delete.
Minimum length is
1
. Format should match the following pattern:^[a-zA-Z0-9_-]{1,128}$
. -
The slug/name for the machine instance.
Minimum length is
1
. Format should match the following pattern:^[a-zA-Z0-9_-]{1,128}$
.
Body
Validation parameters to prove that you really do want to delete the instance.
-
Just to ensure that you understand the ramifications of this action.
Value is
true
. -
This parameter serves to verify that you have read the documentation prior to deleting a machine and have taken the time to consider whether you really want to do so.
Provide
base64urlEncode(hmacSha256(key = "machine name", "machine instance name"))
curl \
-X DELETE https://api.statebacked.dev/machines/my-machine/i/user-1234 \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"dangerDataWillBeDeletedForever":true,"hmacSha256OfMachineInstanceNameWithMachineNameKey":"string"}'
{
"dangerDataWillBeDeletedForever": true,
"hmacSha256OfMachineInstanceNameWithMachineNameKey": "string"
}
{
"dangerDataWillBeDeletedForever": true,
"hmacSha256OfMachineInstanceNameWithMachineNameKey": "string"
}
{
"error": "string",
"code": "specify-org",
"parameter": "string"
}
{
"error": "string",
"code": "specify-org",
"parameter": "string"
}
{
"error": "string",
"code": "missing-scope"
}
{
"error": "string",
"code": "missing-scope"
}