The Box element is currently supporting three types of events: Webhook V1 events, Webhook V2 events, and Polling events. By default, for all our higher environments our app configured for Webhooks V1.
Duplicated events can appear when multiple webhooks are involved and they catch the same event, while each is sending a notification. Here are the two possible cases and their solutions:
1. The Webhook 1 is enabled but also Webhook V2 through the Box element call POST/webhooks. In this case, the solution is to either delete v1 configuration from BOX UI or delete webhook v2 using our APIs.
2. The Box account used to create the instance is at fault for sending multiple events. In this case there could two different webhook applications set up in the concerned Box account and each application is generating an event. To solve the issue one of those applications should be disabled.
As a collaborator of a folder in Box, you have certain permissions to access a folder and all of its subfolders. With this structure, your path to retrieve files will be different than a regular user of the account.
For a regular user, suppose the path to retrieve a file would look like this:
/parent/folder1/folder2/folder3/test-file.pdf
A collaborator that only has access to "folder2" will retrieve the file with this path:
/folder2/folder3/test-file.pdf
We are in the process of normalizing the documents hub even further, but there are always a few unique API provider differences and the 'ID' used to make a GET by the root folder ID is one such difference.
Currently the following values can be used in these elements to make GET calls directly against the root folder by ID (for example, GET /folders/{id}/contents
or GET /folders/{id}/metadata
).
- Box:
0
. For exampleGET /folders/0/contents
. - Dropbox: Double URL-encoded path:
%252F
. For example,GET /folders/%252F/contents
. - Google Drive:
root
. For example,GET /folders/root/contents
. - OneDrive:
root
. For example,GET /folders/root/contents
. - ShareFile: Whatever value was input at instance provision as the Sharefile root folder, such as
top
. For example,GET /folders/top/contents
.
There is a specific order in which custom fields can be posted through API calls to files in Box. The following is an example using sample payload data that can be used as a reference when verifying the necessary API calls to make.
GET /folders/content
or utilize another API call to determine the file ID for an example file.GET /custom-fields/enterprise-templates
or
POST /custom-fields/templates
Note the template key{ "displayName": "Example Template", "fields": [ { "description": "Custom Field Example", "displayName": "CustomField", "hidden": false, "key": "custom1", "type": "string" } ], "hidden": false, "scope": "enterprise", "templateKey": "customTemplate" }
POST /files/{id}/custom-fields/{templateKey}/templates
{ "scope": "enterprise" }
Note: This will associate thecustomTemplate
template with the selected file.POST /files/{id}/custom-fields
{ "path": "/custom1", "scope": "enterprise", "template": "customTemplate", "value": "Custom Field Value" }
Note: this adds a custom field value to the template. The 'path' field in this POST must reference the fields.key from GET /custom-fields/enterprise-templates with a preceding forward slash.