API referenceOperations

Request Erasure

POST
/v1/admin/erasure-requests

Not available yet. This operation is part of the published contract and answers 501 not_implemented until it is built. The request and response shapes below are final for this contract version.

Erase one end user's data in every store (SQR-07), with proof of deletion per store.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Bearer credential. API keys look like sqk_<geo>_<key_id>_<secret>: treat them as opaque and never put one in a browser. Older keys without the geo part stay valid until rotated. Find a geo's endpoints through GET /.well-known/sparq-discovery before sending a key.

Header Parameters

Sparq-Workspace?string

For a person signed in to a console with several workspaces: the workspace this call is for, one of their memberships (listMyMemberships). Without it such a person gets workspace_required (400); a workspace they are not a member of is forbidden. It never grants anything, and other callers' credentials ignore it.

Formatuuid
Idempotency-Key?string

Makes a retry safe: the same key, route and body within 24 hours returns the stored response and the same result id. The same key with a different body or route is idempotency_conflict; while the first request runs, idempotency_in_progress.

Length8 <= length <= 128

Request Body

application/json
  1. body

Body of POST /v1/admin/erasure-requests: erase one end user's data across stores.

project_id*Project Id
Formatuuid
audience_tenant_id?|null
user_ref*User Ref

The pseudonymous user, as Sparq records it.

Length1 <= length <= 200
reason*Reason
Length1 <= length <= 500

Response Body

Successful Response

application/json
  1. response

A long job. Poll GET /v1/admin/operations/{operation_id} (or /v1/operations/... on the runtime API) until status is final.

operation_id*Operation Id
Formatuuid
kind*Kind

What the job does, for example 'workspace_export', 'audit_export', 'erasure' or 'offboarding'; an open set.

status*Status

'queued', 'running', 'succeeded', 'failed' or 'cancelled'; an open set. The last three are final.

created_at*Created At
Formatdate-time
updated_at*Updated At
Formatdate-time
progress?|null
result_ref?|

Where the result is, once it succeeded: an id or a URL.

problem?|

Why it failed.

coverage?array<>
missing?array<>

For exports that must be complete: why it failed as incomplete.

Example Request
curl -X POST 'http://dev-sparq.centralindia.cloudapp.azure.com:8000/v1/admin/erasure-requests' \  -H 'Content-Type: application/json' \  -d '{  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",  "user_ref": "string",  "reason": "string"}'
Example Response
{  "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52",  "kind": "string",  "status": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "progress": 0,  "result_ref": "string",  "problem": {    "type": "about:blank",    "title": "string",    "status": 400,    "code": "no_compliant_model",    "detail": "string",    "instance": "string",    "request_id": "string",    "issues": [      {        "path": "string",        "message": "string"      }    ],    "geo_id": "string"  },  "coverage": [    {      "source": "string",      "as_of": "2019-08-24T14:15:22Z"    }  ],  "missing": [    {      "source": "string",      "reason": "string"    }  ]}