Create a new relationship link between two documents
Creates a new relationship link between two documents. A link is an instance of a relationship type. A relationship type that describes the link must already exist. The relationship type must have an internal bridge table to create links.
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 "@type": "DocumentLink",7 "createdAt": "2015-10-01T18:30:03.656Z",8 "lastUpdatedAt": "2015-10-01T18:30:03.656Z",9 "displayLabel": "Witnessed by",10 "fromObjectTypeName": "intel_report",11 "fromObjectTypeVersion": 3,12 "fromObjectId": "uuid_502",13 "fromObjectDisplayLabel": "John Smith",14 "toObjectTypeName": "person",15 "toObjectTypeVersion": 6,16 "toObjectId": "uuid_102",17 "toObjectDisplayLabel": "John Smith",18 "fieldValues": {19 "auto_generated_sk": "e5343e0e-3d68-11e8-b467-0ed5f89f718b",20 "created_at_dttm": "2015-10-01T18:30:03.656Z",21 "created_by_user_id": "unit_test",22 "intelReportId": "uuid_502",23 "last_updated_at_dttm": "2015-10-01T18:30:03.656Z",24 "last_updated_by_user_id": "unit_test",25 "personId": "uuid_102",26 "version": 127 },28 "qualifiedTypeName": "intel_report__witnessed_by",29 "restrictedFields": {30 "ssn": {31 "masked": {32 "currentUserIsAuthorizedToReveal": true33 }34 }35 }36}
Name | Type | Required | Description |
---|---|---|---|
includeEntityLabels | boolean | true | Compute and include display labels for both to and from documents in the response. Default: false |
An object that represents the link.
A link between two documents as defined by a relationship type. If a field is masked, its value will not appear in the fieldValues
object.
Name | Type | Required | Description |
---|---|---|---|
relationshipTypeName | string | false | The name of the relationship type that defines this link. |
relationshipTypeVersion | integer | false | The internal Data Hub version of the relationship type. |
relationshipTypeLabel | string | false | The display label for the relationship type. |
id | string | false | The ID of the link. |
qualifiedTypeName | string | false | The qualified name of the relationship type. Qualified names are in the format: fromObjectTypeName + "__" + relationshipTypeName. |
fromObjectTypeName | string | false | The entity type name for the "From" side of the relationship type. |
fromObjectTypeVersion | integer<int64> | false | The internal Data Hub version for the entity type for the "From" side of the relationship type. |
fromObjectId | string | false | The document ID for the "From" side of the relationship type. |
fromObjectDisplayLabel | string | false | The display label for the document on the "From" side of the relationship type. |
toObjectTypeName | string | false | The entity type name for the "To" side of the relationship type. |
toObjectTypeVersion | integer<int64> | false | The internal Data Hub version for the entity type for the "To" side of the relationship type. |
toObjectId | string | false | The document ID for the "To" side of the relationship type. |
toObjectDisplayLabel | string | false | The display label for the document on the "To" side of the relationship type. |
validFrom | string<date-time> | false | The timestamp value that indicates the starting datetime for when the link is valid. |
validTo | string<date-time> | false | The timestamp value that indicates the ending datetime for when the link is valid. |
fieldValues | object | false | The values for the fields that are defined as the attributes of the link. |
restrictedFields | Restricted Fields Map | false | The restrictions that apply to the fields of the link. Currently, only masking field restrictions are represented here. |
createdAt | string<date-time> | false | The timestamp value that indicates when this link was created. |
lastUpdatedAt | string<date-time> | false | The timestamp value that indicates when this link was last modified. |
@type | string | false | Data type that describes the link object. The value is always "DocumentLink". |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | A new relationship link between two documents was created. | Schema | |
400 | Bad Request | The request was invalid. | Schema |