POST

Workdiary.Count

Count Work diary team rows for the selected month. Same filters as Workdiary.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 Workdiary 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

  • Requires module_sidebarmenu_workdiary (missing key = allowed, same as dashboard check_roles_modules).
  • Does not replace TeamHours.* (header clock) or WorkingTime.* (customer time_counter).
  • Click a name → Workdiary.Get. Cog icon → Workdiary.Settings.Get / Save.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
sm_date
post
string2026-08Month as YYYY-MM or "August 2026".
search_data
post
stringjohnFilter members by name. Alias: search.
data_id_change
post
json[14,211]Optional member id list. Alias: user_ids, team_member_id.
colomn_name
post
stringnameSort column. Alias: order_by.
asc_desc
post
stringASCASC or DESC.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Workdiary.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "sm_date": "2026-08"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Workdiary.Count",
    "url_domain": "https:\/\/{domain}\/app\/Workdiary.Count"
}

Endpoint

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

Sample Output

{
    "success": 1,
    "count": 2,
    "total_record": 2,
    "month": "2026-08"
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ sm_date: '2026-08' });
const res = await fetch('/app/Workdiary.Count', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

{
    "success": 0,
    "message": "You have no permission to open Work diary"
}