Patch a relationship link

patch/links/@item
Internal-Use Only

Applies a patch to a relationship link. This enables a client to make changes to a link without needing to load the entire link. The request body contains a description of changes to be made to the link, which is represented by a json-patch object. For more information about json-patch, refer to jsonpatch.com.

Request Samples

1

Response Samples

1{
2 "relationshipTypeName": "witnessed_by",
3 "relationshipTypeVersion": 1,
4 "relationshipTypeLabel": "Witnessed by",
5 "id": "witnessed_by|_|intel_report|_|person|_|e5343e0e-3d68-11e8-b467-0ed5f89f718b",
6 "createdAt": "2015-10-01T18:30:03.656Z",
7 "lastUpdatedAt": "2015-10-01T18:30:03.656Z",
8 "displayLabel": "Witnessed by",
9 "fromObjectTypeName": "intel_report",
10 "fromObjectTypeVersion": 3,
11 "fromObjectId": "uuid_502",
12 "fromObjectDisplayLabel": "John Smith",
13 "toObjectTypeName": "person",
14 "toObjectTypeVersion": 6,
15 "toObjectId": "uuid_102",
16 "toObjectDisplayLabel": "John Smith",
17 "fieldValues": {
18 "auto_generated_sk": "e5343e0e-3d68-11e8-b467-0ed5f89f718b",
19 "created_at_dttm": "2015-10-01T18:30:03.656Z",
20 "created_by_user_id": "unit_test",
21 "intelReportId": "uuid_502",
22 "last_updated_at_dttm": "2015-10-01T18:30:03.656Z",
23 "last_updated_by_user_id": "unit_test",
24 "personId": "uuid_102",
25 "version": 1
26 },
27 "qualifiedTypeName": "intel_report__witnessed_by",
28 "restrictedFields": {
29 "ssn": {
30 "masked": {
31 "currentUserIsAuthorizedToReveal": true
32 }
33 }
34 }
35}

Query Parameters

NameTypeRequiredDescription
_id
string
true

The ID for an individual link. A link ID uses the following format: ${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId} where |_| is the delimiter between link ID components.

Link ID component details:

  • relationshipName - The relationship type name that defines the link.
  • fromEntityTypeName - The entity type name of the starting point for the link.
  • fromEntityId - The unique identifier of the entity that is the starting point for the link.
  • toEntityTypeName - The entity type name of the destination point for the link.
  • toEntityId - The unique identifier of the entity that is the destination point for the link.

When submitting the request, the pipe character (|) must be percent-encoded as %7C. See below for an example of the pipe character properly encoded: ${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}

_includeEntityLabels
boolean
false

Specifies whether to compute and include display labels for both the to document and the from document in the response.

Default:
false

Header Parameters

NameTypeRequiredDescription
If-Match
integer
true

The version of the relationship link to update. This value must match the most recent version of the relationship link. If the value does not match the most recent version of the relationship link, the patch operation fails. This helps prevent conflicting edits from being applied to a relationship link. The ETag of the relationship link to update can also be provided in this header value, as a string. If an ETag is provided, it must match the ETag of the current version of the relationship link on the server. Otherwise, the server responds with a 412 error.

Request Body

A json-patch specification of changes to make to the relationship link. Copy and move operations cannot use a masked field value as their source. Test operations cannot reference masked field values.

Specifies a patch operation that adds a value.

NameTypeRequiredDescription
path
string
false

A JSON Pointer path where the Add operation is applied.

op
string
false

The operation to perform. For Add operations, this is always "add".

Match pattern:
^add$
value
false

The value to add at the location specified by the path.

Responses

StatusMeaningDescription
200OKThe request succeeded. The response body contains the relationship link after the application of the patch. HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundThe relationship link was not found.Schema
412Precondition FailedThe relationship link in the request body was out of date.Schema
428Precondition RequiredThe relationship link in the request body did not contain a version.Schema