Create a new internal document

post/documents

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

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.

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.

Responses

StatusMeaningDescription
201Created

The internal document was created.

HeadersSchema
400Bad Request

The request was invalid.

Schema