Update an internal document
Updates an internal document. This is an appropriate way to add child documents or worksheets to the document. The content of the request is the existing document. Updating external documents is not allowed.
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": 416 },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": true25 }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": 34044 },45 "filterPanel": {46 "expanded": true,47 "width": 20048 }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.581 },82 "type": "person",83 "typeLabel": "Person",84 "x": 711.99394815911,85 "y": 220.23423274212286 },87 "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {88 "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",89 "transitionStart": {90 "x": 339.81315560960843,91 "y": 106.6274514713076292 },93 "type": "person",94 "typeLabel": "Person",95 "x": 621.6305200034983,96 "y": 192.6511375828253397 }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.45110 },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": true123 },124 "transactionTypeIndex": 0,125 "translate": [126 -872.0999999999999,127 -222.32031484257868128 ]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": 2149}
Name | Type | Required | Description |
---|---|---|---|
documentId | string | true | The ID for the document. |
entityTypeName | string | true | The name of the entity type to which the document belongs. |
Name | Type | Required | Description |
---|---|---|---|
Accept | string | false | For document fields that use data masking, it is important to avoid accidentally overwriting values in the database with masked values that have been loaded by the client. In general, masking dots should not be stored in the database. The "Accept" HTTP header can be used to control how masked fields are handled during updates. If this HTTP header is not provided or is set to "application/json", then masked field values that are set to null will be ignored. If the "Accept" header is set to "application/vnd.sas.investigation.data.masked.document+json" then masked fields that are set to the mask template (nine dots) will be ignored. The "Accept" header value should match the data masking approach that was used to fetch data before an update is performed. Allowed values: application/jsonapplication/vnd.sas.investigation.data.enriched.document+jsonapplication/vnd.sas.investigation.data.masked.enriched.document+json |
A modified version of an existing document.
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.
Name | Type | Required | Description |
---|---|---|---|
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. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The request succeeded. | Schema | |
400 | Bad Request | The request was invalid. | Schema | |
404 | Not Found | The document was not found. | Schema | |
412 | Precondition Failed | The document in the request body was out of date. | Schema | |
428 | Precondition Required | The document in the request body did not contain a version. | Schema |