/v1/tasks/mine/countsAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request GET \
--url 'https://api.staging.facily.ai/v1/tasks/mine/counts' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
kindquery · string | nullComma-separated kinds: task, work_order, inspection. Omitted, every kind is counted.
Max length: 200
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": {
"awaiting_proof": 0,
"due_today": 0,
"escalated": 0,
"open": 0,
"overdue": 0,
"overdue_clean_units": {
"count": 0,
"avg_days_overdue": 0
},
"unassigned": 0,
"waiting_for_rotation": 0
},
"meta": {
"request_id": "string"
}
}application/json
dataTaskCountsResponserequiredHow much open work there is, for the KPI strip and the counted pills of the task board.
Show data schema
awaiting_proofintegerrequiredOpen tasks that still need their proof photos.
due_todayintegerrequiredOpen tasks due today.
escalatedintegerrequiredOverdue tasks past their facility's escalation threshold.
openintegerrequiredOpen and in-progress tasks.
overdueintegerrequiredOpen tasks past their due date.
overdue_clean_unitsTaskOverdueCleanUnitsResponserequiredOverdue unit cleanings, and how far past due they are on average.
Show overdue_clean_units schema
avg_days_overduenumber | nullThe mean days past due, to one decimal place; null when there are none.
Show avg_days_overdue schema
number | nullThe mean days past due, to one decimal place; null when there are none.
Variant 1: number
numberVariant 2: null
nullcountintegerrequiredHow many.
unassignedintegerrequiredOpen tasks nobody is assigned to.
waiting_for_rotationintegerrequiredUnassigned open tasks waiting for the rotation.
metaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired