Skip to content

Admin account-deletion queue

GET
/api/v1/admin/deletions
curl --request GET \
--url https://api.deploybase.eu/api/v1/api/v1/admin/deletions \
--header 'Authorization: <Authorization>'

Returns every outstanding deletion request with days-to-deadline and an overdue flag, plus every non-completed purge job (running, pending, failed, blocked). Closes the DEP-197 class of failure: a statutory clock nobody can see.

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
counts

Counts summarises the two lists so the dashboard can badge without recounting.

object
jobs_blocked
integer
jobs_failed
integer
on_legal_hold
integer
overdue
integer
pending
integer
jobs

Jobs are every non-completed purge job: running, pending, failed and blocked. A failed erasure silently blows a statutory deadline, which is the whole reason this endpoint exists (spec §12).

Array<object>
object
attempts
integer
created_at
string
error_message
string
finished_at
string
id
string
next_attempt_at
string
progress
Array<object>
object
counts
object
key
additional properties
integer format: int64
error
string
key
string
label
string
status
string
Allowed values: pending running done failed
requested_by

RequestedBy is copied from teams.deletion_requested_by at claim time, so the job still names the requester after the teams row is anonymised.

string
started_at
string
status
string
Allowed values: pending running completed failed blocked
team_id
string
updated_at
string
pending_requests

PendingRequests are teams in pending_deletion, soonest deadline first.

Array<object>
object
days_to_deadline

DaysToDeadline is whole days until purge_after, negative once it has passed. Computed here rather than in SQL so the operator sees the same clock the worker uses, and nil when the deadline was cleared (a blocked request waiting on a human).

integer
deletion_requested_at
string
deletion_requested_by
string
legal_hold
boolean
name
string
overdue

Overdue means purge_after has passed and the team is still pending. Combined with LegalHold this is the invisible-statutory-clock case that DEP-197 was: a request nobody can see, held open by a control nobody remembers setting.

boolean
purge_after
string
slug
string
status
string
Allowed values: active pending_deletion purging purged
team_id
string
Example
{
"data": {
"jobs": [
{
"progress": [
{
"status": "pending"
}
],
"status": "pending"
}
],
"pending_requests": [
{
"status": "active"
}
]
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Forbidden

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Service Unavailable

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}