Create a new relationship link between two documents

post/links
Internal-Use Only

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.

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
includeEntityLabels
boolean
true

Compute and include display labels for both to and from documents in the response.

Default:
false

Request Body

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.

NameTypeRequiredDescription
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.

Responses

StatusMeaningDescription
201CreatedA new relationship link between two documents was created. HeadersSchema
400Bad RequestThe request was invalid.Schema