POST

FileFolders.Count

Return only the number of configurable file folders matching the same filters used by FileFolders.List.

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Returns only the count for FileFolders using the same filters as the list function.

Push Service

No push is sent because this function only reads data or returns helper information.

Automation

No automation is run for this function.

Special Instructions

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
scope
post
stringfilefolderSend filefolder for the dashboard Files sidebar tree in folders. Alias: mode=filefolder or folders_only=1.
folders_only
post
int1When 1, same as scope=filefolder.
parent_id
post
int42When set to a custom folder id, return only that folder's direct children in folders. Alias: data_id.
limit
post
int25Page size for legacy files_folders data only. Capped at 25. Ignored for scope=filefolder.
start
post
int0Offset for legacy files_folders data rows.
search
post
stringContractsSearch legacy files_folders name columns when not using folders_only.

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/FileFolders.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": [],
    "url_user": "https:\/\/{user}.bull36.com\/app\/FileFolders.Count",
    "url_domain": "https:\/\/{domain}\/app\/FileFolders.Count"
}

Endpoint

POST /app/FileFolders.Count
POST https://{user}.bull36.com/app/FileFolders.Count
POST https://{domain}/app/FileFolders.Count

Sample Output

{
    "success": 1,
    "count": 8
}

Count Only

Use the matching count route with the same filters when the UI only needs total rows for paging.

{
    "url": "\/app\/FileFolders.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/FileFolders.Count",
    "url_domain": "https:\/\/{domain}\/app\/FileFolders.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": [],
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "count": "Total configurable file-folder rows."
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();

const res = await fetch('https://{domain}/app/FileFolders.Count', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}` },
  body
});
const data = await res.json();
console.log(data.count);

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ scope: 'filefolder' });
const res = await fetch('/app/FileFolders.List', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}` },
  body
});
const data = await res.json();
console.log(data.folders);

Error Example

{
    "success": 0,
    "message": "Permission denied to list files_folders"
}