Relation Operations

Get Relation Operation

One relation operation with every relation its jobs touched. While the operation is `pending`, `queue` tells how many chain jobs are ahead of it and which job runs now. Back office only: App tokens receive `403` with `error.code` = `forbidden`.

GET
/relation-operations/{operationId}

Authorization

backOfficeToken
AuthorizationBearer <token>

Shared static token of the B2Core back office, configured for the IB module (not issued by POST /tokens). Send it as Authorization: Bearer <token>. Back-office-only operations require it; App tokens receive 403 there. On back-office requests the acting-user headers (X-B2Core-User-Id, X-B2Core-User-Type, X-B2Core-User-Email) name the B2Core user who acts, recorded as the initiator of relation operations and reassignments; requests with App tokens ignore them.

In: header

Path Parameters

operationId*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/relation-operations/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969",  "type": "relation_create",  "status": "pending",  "subject": {    "userId": "string",    "clientId": "string",    "email": "string",    "name": "string",    "isIb": true,    "deleted": true  },  "parent": {    "userId": "string",    "clientId": "string",    "email": "string",    "name": "string",    "isIb": true,    "deleted": true  },  "relationId": "string",  "progress": {    "total": 0,    "done": 0,    "failed": 0  },  "initiator": {    "type": "admin",    "id": "string",    "email": "string",    "name": "string"  },  "traceId": "string",  "errorMessage": "string",  "startedAt": "2019-08-24T14:15:22Z",  "finishedAt": "2019-08-24T14:15:22Z",  "createTime": "2019-08-24T14:15:22Z",  "updateTime": "2019-08-24T14:15:22Z",  "retries": [    {      "time": "2019-08-24T14:15:22Z",      "initiator": {        "type": "admin",        "id": "string",        "email": "string",        "name": "string"      },      "error": "string",      "failedAt": "2019-08-24T14:15:22Z",      "jobsFailed": 0    }  ],  "items": [    {      "relationId": "string",      "op": "create",      "status": "pending",      "note": "reattached",      "errorMessage": "string",      "child": {        "userId": "string",        "clientId": "string",        "email": "string",        "name": "string",        "isIb": true,        "deleted": true      },      "parent": {        "userId": "string",        "clientId": "string",        "email": "string",        "name": "string",        "isIb": true,        "deleted": true      },      "finishedAt": "2019-08-24T14:15:22Z"    }  ],  "queue": {    "ahead": 0,    "running": {      "kind": "string",      "startedAt": "2019-08-24T14:15:22Z",      "operationId": "string",      "reassignment": {        "reassignmentId": "string",        "type": "string",        "sourceEmail": "string",        "targetEmail": "string"      }    }  }}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "error": {    "message": "relation operations are available to the back office only",    "code": "forbidden"  }}
{  "error": {    "message": "relation operation not found",    "code": "not_found"  }}