Dashboard widgets and reportsGet my external percentage

Get my external percentage

Returns the caller's hours on external-customer projects as a percentage of their net norm hours, for month to date, last month and the last 90 days.

For the CALLER only: percentage = round(hours registered on projects whose customer is not the account's own company ÷ (norm hours − holiday hours) × 100), as integers, for three windows relative to currentDate — month to date (today included), the previous calendar month, and a rolling 90 days ending yesterday (not three calendar months). 0 when the net norm is 0. Full definitions on WidgetDataExternalPercentageRead. currentDate's time part is dropped; no timezone conversion — the caller decides which calendar day "today" is.

Use it to:

  • Show a consultant how much of their capacity went to customer (external) work

Not for:

  • Billable share → GET /v2/widget-data/billable-percentage (different numerator AND a different norm definition)
  • Another employee or a team — always the caller

Behaviour:

  • Idempotent.
  • Safe to retry.
  • Changes are visible to the next read immediately.

See also: GET /v2/widget-data/billable-percentage, GET /v2/widget/all-active-widgets

Not yet documented: examples.

curl -X GET "https://app3.timelog.com/your-account/api/v2/widget-data/external-percentage?currentDate=2024-12-25T10%3A00%3A00Z" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "Properties": {
    "UserId": 123,
    "CurrentMonthPercentage": 25,
    "LastMonthPercentage": 25,
    "LastThreeMonthsPercentage": 25
  },
  "Links": [
    {
      "Href": "example_string",
      "Rel": "example_string"
    }
  ],
  "Actions": [
    {}
  ]
}
GET
/v2/widget-data/external-percentage
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.
query
currentDatestring
Required

The reference day ('today'). Windows: month start … currentDate; previous calendar month; currentDate−90 … currentDate−1. Time part dropped. Omitted → 404 action not matched (captured). Date only — no time component.

Format: date-time
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).

The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.

Not yet documented: how to obtain a token.

Not yet documented: token lifetime.

Query Parameters

currentDatestring
Required

The reference day ('today'). Windows: month start … currentDate; previous calendar month; currentDate−90 … currentDate−1. Time part dropped. Omitted → 404 action not matched (captured).

Date only — no time component.

Responses

Propertiesobject

"External percentage" of ONE user (the caller): registered hours on projects of external customers as a percentage of the user's norm hours (expected working hours) minus holiday, for three windows relative to currentDate. Formula, per window: round(ExternalHours / NetNormHours × 100) as an integer; 0 when NetNormHours = 0. - ExternalHours = SUM of the caller's project time registrations (those linked to a task allocation through a work unit row) on projects whose customer is NOT the account's own company (application value FirmaID). Billable and non-billable hours both count. Registrations without such a work unit (e.g. absence) are not counted. - NetNormHours = Function_Calulate_Norm_New(employee, from, to, SubtractVacation = 1): SUM of the employee's NormalWorkingHours in the window, clipped to the employment period (hire / dismissal date), minus hours registered on absence codes whose system absence code type is 2 (holiday); never below 0. - Values can exceed 100 (more external hours than norm).

Linksarray
Actionsobject[]