Guide
Here are some answers to the popular questions about API. If this page doesn't answer your question, please contact us in the support chat.
How to create Single-Select and Multi-Select fields via Integration API?
Here are the prompts.
Single-select:
type: 'text',
subType: 'single-select'
Multi-select:
type: 'array[text]',
subType: 'multi-select',
Sample:
{
state: {
name: `State`,
type: `text`,
subType: `workflow`,
options: [
{
name: `New`,
default: true,
},
{name: `In Work`},
{
name: `Closed`,
final: true,
},
],
},
}
Note, that if you want to update the values of the Multi-select, you need to treat that as a collection and use this guide - addToEntityCollectionField
await fibery.entity.addToEntityCollectionField({
'type': 'Cricket/Player',
'field': 'comments/comments',
'entity': { 'fibery/id': PARENT_ENTITY_ID },
'items': [
{ 'fibery/id': COMMENT_ID }
]
});
Workflow:
type: 'text',
subType: 'workflow`
Optionally you can pass a list of options. If the options property is missing, Fibery will try to identify options based on your data dynamically.
Options format:
[
{
name: 'Open',
color: '#123414', // OPTIONAL
default: true/false, // Workflow should have record with default flag
final: true/false // workflow final step
}
]
It’s also possible to pass multi-select with type text but in this case, options should be comma-separated (e.g. dev,high prio,r22)
How can I create a Muli Select using the API?
It’s maybe not clear from the documentation, but select fields (single- and multi-selects) are basically databases, where each entity is an option, and there is a relation (many-to-one or many-to-many) from the main database to the select db.
So to create a select field, you have to create an enum db and then create a field in your main db that is a relation to it.
See here for some helpful info.
Is there a way to see logs and print out something in Script Actions (Execute Javascript Code)?
Please use console.log() in js code, and it's output will be available in the Button/Rule Activity Log
How to call the Location field via API?
GraphQL
Unfortunately, not possible at the moment.
REST API
The location field should work like any other field, both in regular / HTTP API and in javascript API in automations.
How to update the avatar with a URL to an image?
Avatars is the same file collection as the files, so check File API
You can find a nice discussion in our community 🙂
How to update the Icon Field?
await fibery.updateEntity(entity.type, entity.id, {'Icon': ':grimacing:'});
How to work with the Lookup Field?
A Lookup Field is basically the same as a Formula field.
Feel free to share your use case in the community.
How to work with Documents?
This API is still undocumented. However, to work with Document View content using ordinary or api documents, you need only the document secret.
To obtain that secret for a document view with public id "45" one may query views api as described here - View API
{
"jsonrpc": "2.0",
"method": "query-views",
"params": {
"filter": {
"publicIds": ["45"]
}
}
}
Response
{
"jsonrpc": "2.0",
"result": [
{
"fibery/id": "43addb30-1fd0-11ee-9009-a7c752e861c6",
"fibery/public-id": "45",
"fibery/name": "Supa Doc",
"fibery/icon": null,
"fibery/description": null,
"fibery/rank": -9006999178042705,
"fibery/type": "document",
"fibery/meta": {
"documentSecret": "e27df257-0e6f-441f-8dcc-fde2591d12c3"
},
...
}
]
}
See the "fibery/meta" property with "documentSecret" in it. With this UUID you may do whatever you need with document content via standard documents API.
How can I check who has which permissions (capabilities) for a specific database?
You can use the fibery.type/query-capability-sources API command.
It returns all users who have access to a given database (type) and explains how each user obtained their permissions.
Basic API Call
[{
"command": "fibery.type/query-capability-sources",
"args": {
"type": "SoftDev/Task"
}
}]
This returns all active users by default along with their effective capabilities for the specified database.
Optional: Explicitly Limit to Active Users
[{
"command": "fibery.type/query-capability-sources",
"args": {
"type": "SoftDev/Task",
"active-users?": true
}
}]
ℹ️ Note: active-users? is optional — active users are returned by default.
API Token Activity Details
You can see the "Created" and "Last Used" dates for API tokens, along with the token prefix. For older tokens, the creation date won’t be available and will show as "N/A." Activity tracking (last used date) will also be shown from September 19th, 2024.
Is it possible to create a Formula field via API?
At the moment, we don’t have a public API for this specific functionality. That said, it is technically possible to observe how Fibery’s UI interacts with the backend by inspecting network requests — and from there, infer the structure of the API calls.
However, please note that these internal APIs aren’t officially supported and may change at any time without notice, so we can’t guarantee stability or backward compatibility.
If you have a particular use case in mind, feel free to share it — we might be able to suggest a safer or more stable approach.
Troubleshooting
I'm trying to connect to my PostgresQL database and get "Server is not available... Caused by: SSL/TLS required" error
You can use ?ssl=true to fix the issue. Find the example reference in this community thread.
I have error "Version is required"
Please, check you config.app.json file
The config must contain the following keys:
[
`name`,
`version`,
`authentication`,
`sources`,
`description`,
]
I'm facing timeouts
We recommend dividing your entities into separate batches that are processed individually by different Rules, all of which perform the same operation but on distinct subsets of entities.
The downside is that you now need to maintain multiple Rules instead of one.
Here you can check our community discussion and vote for potential improvements. You are also welcome to check Fibery Script Management tool written by our partner Matt – so you could write and maintain a single script that could be automatically pushed to multiple Rules.
I have problem "[Violation] 'SetTimeout' handler"
This error is not related directly to the rule. Maybe it was caused by something else (e.g. a browser extension).
We don't write console.log statements from a script to the browser console when executing rules.
It's impossible, as the rule is run automatically, not triggered by a user. For buttons, we do this.
What you can do right now: