Skip to main content
The API uses type for Database and app for Space. See Terminology.

Select rich text Field

Take a look how rich text Fields work in Fibery, if you haven’t yet. To select a rich text Field we should:
  1. Get fibery/secret of the corresponding collaborative document.
  2. Get the document via api/documents endpoint using this fibery/secret.
Supported document formats:
  • Markdown (md) — default
  • HTML (html)
  • JSON of a particular structure (json)
  • Plain-text (plain-text)
Cricket/Player Database used as an example Get the related collaborative document’s fibery/secret:
Grab the secrets (cURL):
Get the documents one-by-one:
Result:
Get multiple documents in a single batch request:
Result:

Update rich text Field

To update a rich text Field we should:
  1. Get fibery/secret of the corresponding collaborative document.
  2. Update the document via api/documents endpoint using this fibery/secret.
Supported document formats:
  • Markdown (md) — default
  • HTML (html)
  • JSON of a particular structure (json)
Cricket/Player Database used as an example Get collaborative document’s fibery/secret:
Grab the secret:
Update the document:
Update multiple documents in a single batch request:
Status code 200 means that the update has been successful.

Add comment

Once you install the Comments extension on a Database, you are free to add comments to the Database’s Entities – both via UI and API. Comments are assembled from pre-existing basic building blocks:
  • Comment (comments/comment) is a Database with Fields like Author (fibery/created-by) and Creation Date (fibery/creation-date).
  • The Comments extension connects a parent Database with the Comment Database via a one-to-many relation.
  • Each individual comment is an Entity of the Comment Database.
  • The content of a comment is stored in a collaborative document just like rich-text Fields.
To add a comment:
  1. Create an Entity of the Comment Database.
  2. Connect this comment to a proper parent Entity.
  3. Set the comment’s content.
Generate two UUIDs – for the comment ID and the document secret ID:
Create an Entity of the auxiliary Comment Database and link it to the parent Entity:
Make sure the result looks good:
Set the comment’s content: