Note:Properties can be added and deleted after class creation.
Limits
Documents have a 1MB size limit, so any otherwise unlimited field likerichText or custom fields of type TEXT must fit inside this restriction.
Additionally, the title system field, as well as any other STRING fields have a 1500 byte limit.
Setting system and custom fields
To set any fields in AODocs, you have to pass the correct JSON-formatted field-value pair as part of the request body along with the desired type of HTTP request:PUT to create a document; and PATCH to modify it.
Setting system fields
In a document resource, system fields are top-level fields (not nested), and you can address them by name directly in your request.Sample request
Updatability of system fields
In AODocs APIs, you can define system field values for a document when it is either created or updated. Some of these fields can be created or modified only if you set thesetModifiedDate boolean flag to true.
The following table outlines allowances and requirements for each system field (sMD means setModifiedDate):
¹
title is automatically populated as “Untitled” if left unspecified
Use case: setModifiedDate flag
When you update a document with the API, whether it’s creation or modification, the document gets updated with your changes and there is an implicit update to two system fields:modifiedDate and updateAuthor, that will get the current date and current user value regardless of the field values you put in the request.
This flag allows write access to these two fields: it exists so that tools like a bulk updater can edit fields or other information in the document without the modification date and the modification author getting set to the latest system values. For actions that have the requirement of preserving the modifiedDate and updateAuthor fields as is, explicitly pass their previous values along with your document changes and the setModifiedDate flag set to true.
Sample request
Expected formats for system fields
Setting custom fields
In a document resource, custom fields are found inside thefields array.
Custom fields are defined in the document’s class when it’s created; and you or a client app populate their values when creating or modifying a document.
In order to populate custom fields, you must know the fieldId of the particular property of your target class (that each document in that class has). You then use it to tell the server which values of this particular property should be set. To do this, populate fields[].fieldId with your target class’s fieldId.
Note:Alternatively, you can populate
fields[].fieldName with the target class’s fieldName. However, this is not recommended, as the name of a field can change.fields[].values[] with the values you want.