Skip to main content

Update document or record

Motivation​

Update a CDoc, WDoc, CRecord or WRecord using API

Functional Design​

PATCH /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/{id}

Headers​

KeyValue
AuthorizationBearer {PrincipalToken}
Content-Typeapplication/json

Parameters​

ParameterTypeDescription
ownerstringname of a user who owns the application
appstringname of an application
wsidint64the ID of workspace
pkg, tablestringidentifies a table (document or record)
idint64ID of a document or record

Body​

CDoc/WDoc/CRecord/WRecord (fields to be updated)

Result​

CodeDescriptionBody
200OKcurrent WLog offset and the new IDs, see below
400Bad Request, e.g. Record requires sys.ParentIDerror object
401Unauthorizederror object
403Forbiddenerror object
404Table Not Founderror object
405Method Not Allowed, table is an ODoc/ORecorderror object

Example Result 200:

{
"currentWLogOffset":114,
"newIDs": {
"1":322685000131212
}
}