Skip to content

Get removal status

GET
/api/v1/deployments/{id}/removal-status
curl --request GET \
--url http://localhost:3000/api/v1/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/removal-status \
--header 'X-API-Key: <X-API-Key>'

Reports, per device, whether a deleted deployment has actually been removed from the client. Deleting a deployment only requests removal; the device confirms it by reporting removed (or failed) over the Margo status endpoint. Devices that have been asked and have not answered are reported as awaiting, which is neither a success nor a failure.

id
required
string format: uuid

Deployment UUID

x-organization-id
string format: uuid

UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.

Removal status retrieved successfully

Media typeapplication/json
object
deploymentId
required

Deployment UUID

string
removalRequested
required

Whether removal has been requested (the deployment has been withdrawn from desired state).

boolean
removalRequestedAt
required

When removal was requested

string
nullable
total
required

Number of device instances this deployment ever targeted

number
confirmed
required

Devices that reported removed

number
awaiting
required

Devices that were asked to remove and have not reported a terminal state. Not an error and not a success — an open question.

number
failed
required

Devices that reported failed. The workload may still be present on these devices and they need operator attention.

number
notRequested
required

Instances for which removal has not been requested. Non-zero only while the deployment is live.

number
devices
required

Per-device detail

Array<object>
object
instanceId
required

Deployment instance UUID

string
deviceId
required

Device UUID

string
deviceName
required

Device display name

string
nullable
clientId
required

Margo clientId the device authenticates with

string
removalState
required

Confirmed = the device reported removed. failed = the device reported failed. awaiting = removal was requested and the device has not reported a terminal state. notRequested = removal has not been requested for this instance.

string
Allowed values: confirmed awaiting failed notRequested
statusMessage
required

Last status message, including the device-reported failure reason

string
nullable
lastStatusReportAt
required

When the device last reported any status for this instance. Null means the device has never reported — the distinguishing fact between a silent device and a compliant one.

string
nullable
excludedAt
required

FM-1301: when the operator removed the deployment from this device alone. Null when the whole deployment was withdrawn or the device is still a target.

string
nullable
updatedAt
required

When this instance row last changed

string
Example
{
"devices": [
{
"removalState": "confirmed"
}
]
}

Forbidden — caller lacks required permission

Deployment not found