POST

Projects.Count

Return only the number of projects matching the same filters used by Projects.List (dashboard project).

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 Projects 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

  • Dashboard Projects table: POST /app/Projects.List (Bearer staff token).
  • Visibility matches dashboard: own projects, projects where you are in member JSON, and for org owner also non-private projects owned by team members.
  • TIMELINE badges = timeline.to_do (red), timeline.queries (yellow), timeline.testing (blue); also timeline_counts [to_do, queries, testing].
  • Purple/private rows: private_project=1 / is_private=true.
  • Count only: Projects.Count with the same filters.
  • Create/edit/delete: Projects.Add, Projects.Update, Projects.Delete (or Projects.Save). Archive: Projects.Archive. Single row: Projects.Get.
  • Board columns CRUD: Projects.ColumnsList / Get / Add / Update / Delete.
  • Customer app portal projects: Customer.Projects.List (separate token).

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
search
post
stringwebsiteSearch project name, note, and custom_fields (same as dashboard search).
search_project_name
post
stringtest liveDashboard filter: project name contains.
search_client_name
post
stringSwetaDashboard filter: client (contactus) name contains.
search_team_member
post
mixed47Dashboard filter: one or more team member ids that must appear in projects.member (array or comma list).
team_member_id
post
mixed47Alias of search_team_member.
customer_id
post
int12614595Filter by client_id. Aliases: client_id, cust_id, filter_client_id.
client_id
post
int12614595Alias of customer_id.
status
post
string2Filters projects.status when set.
archive
post
mixed0Archive filter. Default 0 (active). Use filter_archive_project for the dashboard field name.
filter_archive_project
post
int0Dashboard archive filter (0 active / 1 archived).
use_as_template
post
mixed0When 1, list template projects. Default 0. Alias: filter_use_as_template_project.
from_date
post
date2026-07-01Filter c_date from. Alias: from_project_date, created_from. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part.
to_date
post
date2026-09-30Filter c_date to. Alias: to_project_date, created_to. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part.
from_project_date
post
date2026-07-01Dashboard date-from filter on projects.c_date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part.
to_project_date
post
date2026-09-30Dashboard date-to filter on projects.c_date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part.
limit
post
int25Page size. Values above 25 are capped.
start
post
int0Row offset. Or use page_id (1-based) when start is omitted.
page_id
post
int11-based page like dashboard pagination when start is not sent.
length
post
int25Alternative page-size field. Values above 25 are capped to 25.
per_page
post
int25Alternative page-size field. Values above 25 are capped to 25.
draw
post
int1Optional DataTables draw counter.
search[value]
post
stringjohnDataTables search text when supported.
filter_data
post
stringjohnLegacy/general filter text when supported.
order_dir
post
stringdescOrder direction: asc or desc (default desc by last_query_update, id).
order[0][dir]
post
stringdescDataTables order direction: asc or desc.
search_letter
post
stringTProject name starts with this letter.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

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

Endpoint

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

Sample Output

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

Count Only

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

{
    "url": "\/app\/Projects.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/Projects.Count",
    "url_domain": "https:\/\/{domain}\/app\/Projects.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "search": "website"
    },
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "count": "Total projects matching the sent filters."
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('search', 'website');

const res = await fetch('https://{domain}/app/Projects.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({ search: 'website' });
const res = await fetch('/app/Projects.Count', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

{
    "success": "0",
    "error": "bearer_token_required",
    "message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}