Create a new internal document

post/documents
Internal-Use Only

Create a new internal document. If child documents are included in the request body, new child documents are also created.

Request Samples

1

Response Samples

1{
2 "objectTypeName": "person",
3 "objectTypeId": 100515,
4 "objectTypeVersion": 4,
5 "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
6 "fieldValues": {
7 "birthday": "2020-01-05T00:00:00Z",
8 "created_at_dttm": "2020-04-13T19:17:47.84Z",
9 "created_by_user_id": "viuser",
10 "first_name": "John",
11 "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
12 "last_name": "Smith",
13 "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
14 "last_updated_by_user_id": "viuser",
15 "version": 4
16 },
17 "createdAt": "2020-04-13T19:17:47.840Z",
18 "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
19 "validFrom": "2020-01-05T00:00:00.000Z",
20 "fieldRestrictions": {
21 "person": {
22 "ssn": {
23 "masked": {
24 "currentUserIsAuthorizedToReveal": true
25 }
26 }
27 }
28 },
29 "sheets": [
30 {
31 "id": 201,
32 "type": "WORKSHEET",
33 "name": "Workspace-1",
34 "version": 2,
35 "created": "2020-04-13T19:27:08.105Z",
36 "createdBy": "viuser",
37 "lastModified": "2020-04-13T19:27:26.175Z",
38 "lastModifiedBy": "viuser",
39 "tabOrder": 0,
40 "uxState": {
41 "commonToolPane": {
42 "expanded": true,
43 "width": 340
44 },
45 "filterPanel": {
46 "expanded": true,
47 "width": 200
48 }
49 },
50 "cells": [
51 {
52 "type": "LIVE",
53 "id": 301,
54 "row": 0,
55 "position": 0,
56 "height": 0,
57 "width": 0,
58 "version": 1,
59 "documents": [
60 {
61 "type": "person",
62 "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
63 "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
64 },
65 {
66 "type": "person",
67 "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
68 "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
69 }
70 ],
71 "visualizationType": "Network",
72 "resultsPerPage": 0,
73 "networkData": {
74 "links": [],
75 "nodes": {
76 "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
77 "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
78 "transitionStart": {
79 "x": 667,
80 "y": 206.5
81 },
82 "type": "person",
83 "typeLabel": "Person",
84 "x": 711.99394815911,
85 "y": 220.234232742122
86 },
87 "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
88 "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
89 "transitionStart": {
90 "x": 339.81315560960843,
91 "y": 106.62745147130762
92 },
93 "type": "person",
94 "typeLabel": "Person",
95 "x": 621.6305200034983,
96 "y": 192.65113758282533
97 }
98 },
99 "numNodes": 2,
100 "options": {
101 "activeNodes": false,
102 "centralityType": null,
103 "displayableTransactionType": null,
104 "groupCtr": 1,
105 "layout": {
106 "charge": 25,
107 "linkDistance": 130,
108 "linkStrength": 0.4,
109 "velocityDecay": 0.45
110 },
111 "nodeCtr": 1,
112 "scale": 2.0766116941529233,
113 "showLegend": true,
114 "showLinkLabels": false,
115 "showNodeAnnotation": true,
116 "showNodeLabels": true,
117 "showTimeline": false,
118 "showTransactionDetails": false,
119 "showTransactionLinks": false,
120 "toolsPane": {
121 "activeTool": "Object Inspector",
122 "open": true
123 },
124 "transactionTypeIndex": 0,
125 "translate": [
126 -872.0999999999999,
127 -222.32031484257868
128 ]
129 }
130 }
131 }
132 ]
133 }
134 ],
135 "comments": [
136 {
137 "id": 1,
138 "author": {
139 "id": "viuser",
140 "name": "Test viuser"
141 },
142 "createDate": "2020-04-13T19:18:05.087Z",
143 "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
144 "lastUpdatedBy": "viuser",
145 "detail": "Sample comment<br />"
146 }
147 ],
148 "attachmentsCount": 2
149}

Query Parameters

NameTypeRequiredDescription
_operation
string
false

When this query parameter is set to CREATE_AND_LINK, the request body contains both an enriched document and a link. Both the enriched document and the link are created in one operation. In this case, the client can set the Accept header of this request to application/vnd.sas.investigation.data.masked.enriched.document.and.link+json. If it does, any masked data in the response will be replaced with dots. Otherwise, masked data in the response is omitted.

Allowed value:
CREATE_AND_LINK

Request Body

The document to be created.

The actual data that is associated with a particular Entity Type. Entity Types are the metadata and Documents are the data. The document is "enriched" with additional data such as comments, insights, and workspaces.

Examples:
{"$ref":"#/components/examples/enrichedDocumentExample"}{"$ref":"#/components/examples/documentExample"}
NameTypeRequiredDescription
objectTypeName
string
false

The name of the entity type with which the document is associated.

objectTypeId
integer<int64>
false

The ID of the entity type with which the document is associated.

objectTypeVersion
integer
false

The internal Data Hub version for the entity type that is associated with the document.

id
string
false

The qualified ID that uniquely identifies the document.

displayLabel
string
false

The value to use for displaying the ID of the document.

fieldValues
object
false

The values for the fields and child objects that are defined for the related entity type. The actual data of the document exists here.

validFrom
string<date-time>
false

The timestamp value that indicates the starting datetime for when the document is valid.

validTo
string<date-time>
false

The timestamp value that indicates the ending datetime for when the document is valid.

createdAt
string<date-time>
false

The timestamp that indicates when the document was created.

lastUpdatedAt
string<date-time>
false

The timestamp that indicates when the document was last modified.

comments
array [Comment]
false

The comments that are associated with the document.

sheets
array [Sheet]
false

The insights and workspaces that are associated with the document.

attachmentsCount
integer<int64>
false

The number of attachments that are associated with the document.

fieldRestrictions
Field Restrictions Bundle
false

A bundle of field restrictions that apply to fields in the document as well as any embedded child documents.

Responses

StatusMeaningDescription
201CreatedThe internal document was created. HeadersSchema
400Bad RequestThe request was invalid.Schema