Save a document as an existing object

POST {{baseUrl}}/api/documents/:id/instances/:instanceId/save?fields=Excepteur Lorem

Save a document instance by overwriting an existing document. The existing document object in the metadata is reused, retaining the same object ID. You obtain the authorization token needed to execute the request using POST /auth/login and the project ID using GET /project; you pass the authorization token and the project ID in the request header. You identify the document and the document instance by specifying the document ID and the document instance ID in the path of the request; you get the document instance ID using POST /documents/{id}/instances. You specify the document creation information in the body parameter of the request; you can specify a name and description for the new document and the folder where the new document should be saved.

Request Params

KeyDatatypeRequiredDescription
fieldsstringComma separated top-level field whitelist. This allows client to selectively retrieve part of the response model. If specified, extra filtering will be applied, and for top-level object (if root model is an array, each array element), only the listed fields will be kept in the response. e.g. "id,elements" means to keep only the "id" field and the whole "elements" array field, omitting all other fields of top-level response model.

Request Body

{"overwrite"=>true, "name"=>"mollit dolor reprehenderit id Excepteur", "folderId"=>"do tempor nisi irure", "description"=>"id est laborum", "promptBehavior"=>-60200532}

HEADERS

KeyDatatypeRequiredDescription
X-MSTR-AuthTokenstring(Required) Authorization token
X-MSTR-ProjectIDstring(Required) Project ID
Content-Typestring

RESPONSES

status: Created

{"id":"sed exercitation"}