POST
Mission.Count
Return only the number of missions/tasks matching the same filters used by Mission.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 Mission 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
| Name | Type | Sample | What it gives |
|---|---|---|---|
startpost | int | 0 | First row offset for paging. |
lengthpost | int | 25 | Maximum number of missions to return. Values above 25 are capped to 25. |
limitpost | int | 25 | Alternative page-size field mapped to length. Values above 25 are capped. |
per_pagepost | int | 25 | Alternative page-size field mapped to length. Values above 25 are capped. |
typepost | string | today_tasks | Task list type: today_tasks, priority_tasks, upcoming_tasks, done_tasks, show_all_together_tasks, or private_tasks. |
include_countspost | int | 1 | When 1, first-page response includes tab_counts and scope_counts. Send 0 to skip extra count queries for faster paging. |
create_bypost | string | my_task | Task ownership filter: my_task, created_by_me, or all_my_team_task. If omitted, the user default mission task setting is used. |
create_by_userspost | array|string | 47,48 | Filter by creator user ids. |
filter_mission_by_organization_userpost | array|string | 47 | Filter by assigned organization user. Checks mission member_id and sub_missions users. |
branch_team_memberpost | string | 47,48 | Comma-separated team member ids for branch/team filtering. |
filter_mission_by_mission_steppost | array|string | 1,2 | Filter by mission step ids. |
mission_stappost | array|int | 1 | Legacy mission-step filter accepted by the old mission screen. |
mission_colorpost | array|string | red,yellow | Filter missions by Choose Color values: transparent, yellow, red, green, blue. Alias: color. |
project_columnpost | string | to_do | Filter by project column. Common values: to_do, queries, testing, done, plus account custom columns. |
mission_namepost | string | call | Filter by mission title text. |
project_namepost | string | Website | Filter by joined project name. |
client_namepost | string | Dana | Filter by joined customer/contact name. |
searchpost | string | call | Search mission title, mission note, or joined customer name. |
search[value]post | string | call | DataTables search text when sent by an existing grid. |
show_done_missionpost | int | 0 | Include done missions in scope/counts. Done tab forces done visibility. |
show_private_missionpost | int | 0 | Include private missions that the logged-in user created/owns. Private missions from other users remain hidden. |
scope_show_private_missionpost | int | 1 | Controls whether scope_counts include own private missions. |
show_all_projects_missionspost | int | 0 | Include all missions from visible projects. When 0, grouped project logic returns the next/top mission per project. |
merge_today_by_prioritypost | int | 0 | When 1, overdue priority missions are merged into the Today tab and the Priority tab count/list is adjusted. |
all_taskpost | int | 0 | When 1, disables backend paging. SDK callers should normally keep 0 so the app limit cap is enforced. |
date_from_duepost | date | 2026-07-01 | Due-date filter start. 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. |
date_to_duepost | date | 2026-07-31 | Due-date filter end. The selected day is included. 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. |
date_frompost | date | 2026-07-01 | Created-date filter start. 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. |
date_topost | date | 2026-07-31 | Created-date filter end. The selected day is included. 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. |
show_taskpost | int | 1 | Updates the logged-in user default mission task view. Use carefully from settings UI only. |
only_create_by_countspost | int | 1 | Return only mission creator/count data when supported. |
order_bypost | string | date_to_do | Column/key to order by when supported by the backend. |
sortpost | string | date_desc | Sort preset when supported. |
order_dirpost | string | desc | Order direction: asc or desc. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Mission.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"type": "today_tasks",
"create_by": "my_task"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Mission.Count",
"url_domain": "https:\/\/{domain}\/app\/Mission.Count"
}Endpoint
POST /app/Mission.Count
POST https://{user}.bull36.com/app/Mission.Count
POST https://{domain}/app/Mission.CountSample Output
{
"success": 1,
"count": 30
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Mission.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Mission.Count",
"url_domain": "https:\/\/{domain}\/app\/Mission.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"type": "today_tasks",
"create_by": "my_task"
},
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"count": "Total missions\/tasks matching the sent filters."
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('type', 'today_tasks');
body.set('create_by', 'my_task');
const res = await fetch('https://{domain}/app/Mission.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({ type: 'today_tasks', limit: '25' });
const res = await fetch('/app/Mission.Count', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data.count);Error Example
{
"success": "0",
"error": "bearer_token_required",
"message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}