API referenceOperations

Get Admin Operation

GET
/v1/admin/operations/{operation_id}

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.

A long Admin API job: an export, an erasure or an offboarding.

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.

Path Parameters

operation_id*Operation Id
Formatuuid

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

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 GET 'http://dev-sparq.centralindia.cloudapp.azure.com:8000/v1/admin/operations/497f6eca-6276-4993-bfeb-53cbbbba6f08'
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"    }  ]}