Move sibling connections
Learn more about changing the order of sibling connections in a hierarchy instance.
Use the Move sibling connections to reorder one or more child entities under their parent entities. You can move each child before or after a reference child, or move it to the first or last position.
The request is atomic. f the API cannot find the parent entity, child entity, or required reference child entity for any move entry, it does not save any move in the request.This operation requires the MDM.Data.Hierarchy permission with the UPDATE privilege.
HTTP method and endpoint
Use the following HTTP method and endpoint path to reorder hierarchy children.
POST https://<environment>.reltio.com/reltio/api/{tenantId}/hierarchies/{instanceId}/connections/move
The following table describes the endpoint path parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
tenantId | String | Yes | Unique identifier of the tenant. |
instanceId | String | Yes | Unique identifier of the hierarchy instance that contains the connections. |
Request headers
The following request headers must be included.
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <access_token> | Yes |
Content-Type | application/json | Yes |
Request body
The request body is a JSON array of move entries. The following table describes the parameters in each move entry.
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
parentId | String | Yes | Identifier of the parent entity whose child entities you want to reorder. | |
childId | String | Yes | Identifier of the child entity you want to move. | |
referenceChildId | String | Yes, when moveType is BEFORE or AFTER. | Identifier of the child that defines the target position. | |
moveType | String | Yes | Position to which the child entity is moved. Use one of the following values:
| BEFORE, AFTER, FIRST, or LAST |
Example request
Use the following example to move a child before a reference child.
POST https://<environment>.reltio.com/reltio/api/{tenantId}/hierarchies/{instanceId}/connections/move
Authorization: Bearer <access_token>
Content-Type: application/json
[
{
"parentId": "0ABlXju",
"childId": "1XErCw7G",
"referenceChildId": "1XErAb3F",
"moveType": "BEFORE"
}
]
Response body
The following table describes the fields returned in the response body.
| Field | Type | Description |
|---|---|---|
instanceId | String | Identifier of the hierarchy instance whose child entities were reordered. |
status | String | Status of the move operation. A successful operation returns MOVED. |
Example response
The following example shows a successful response.
{
"instanceId": "0ABlc0A.1",
"status": "MOVED"
}
Error codes and recommended actions
The following table lists the possible error responses returned by this API.
If any move entry in the request fails validation, the API rejects the entire request and does not save any reordering changes in that request.
| HTTP status | Description | Recommended action |
|---|---|---|
400 Bad Request | The request contains invalid or missing parameters. | Review the error message and correct the request as indicated. Check that the body is a JSON array of move entries with valid parentId, childId, and moveType values; that referenceChildId is present when moveType is BEFORE or AFTER. |
401 Unauthorized | The access token is missing, expired, or invalid. | Obtain a valid access token and resubmit the request. For details, see Authentication API. |
403 Forbidden | Access is denied. The authenticated user does not have the UPDATE privilege on the MDM.Data.Hierarchy resource. | Contact your tenant administrator to assign the required hierarchy permission to your role, and then resubmit the request. |