Skip to main content

Workflow Instances Detail Report

Paginated detail of every workflow instance started in a date range — status, duration, owner, and task progress.

GET/apidev/v1/reports/workflow/instances
PermissionAPICLI_RPTWF_INSTANCIAS
Rate Limit10 req/min
Cache300s
Max Range92 days

Overview​

Returns one row per workflow instance created within the date range, ordered and paginated server-side. Each row reports the workflow definition name, the linked entity (type and reference), the instance status, start/end timestamps, total duration, who started it, and how many of its tasks are completed. Use the optional filters to narrow by workflow definition, instance status, entity type, or a free-text search over the workflow name and entity reference.


Request​

Request Headers​

Every request to a protected endpoint requires these headers:

HeaderRequiredDescription
AuthorizationYesBearer token obtained from the Login endpoint. Format: Bearer <token>
X-API-KeyYesCompany integration key provided during onboarding. Format: gtk_xxx...
tenantYesYour assigned tenant domain (default: geotareas.com) — always send your assigned tenant
Content-TypeConditionalapplication/json — required for POST and PUT requests

Query Parameters​

ParameterTypeRequiredDefaultDescription
startdatestringYes—ISO 8601 start date-time (e.g. 2026-03-01T00:00:00). Filters by instance creation date.
enddatestringYes—ISO 8601 end date-time. Max range 92 days from startdate.
definition_idsstringNo—Comma-separated workflow definition IDs to include. Max 100.
statusesstringNo—Comma-separated instance statuses (e.g. RUNNING,COMPLETED,ERROR,CANCELLED). Max 20.
entity_typestringNo—Filter by the linked entity type. One of: TAREA, CUENTA, CLIENTE, PERSONAL, DISPOSITIVO, NINGUNA.
searchstringNo—Free-text search over workflow name and entity reference. Max length 120.
sort_bystringNostartedAtColumn to sort by. One of: startedAt, endedAt, durationSeconds, taskCount, status, entityType, workflowName.
sort_dirstringNodescSort direction: asc or desc.
limitintegerNo25Number of records per page (1–100).
offsetintegerNo0Number of records to skip for pagination.
sort_by is validated per report

This report accepts exactly these values:

startedAt · endedAt · durationSeconds · taskCount · status · entityType · workflowName

Three legacy aliases are also accepted and resolve to the same columns: wfinstcreatedat (= startedAt), wfinstenddat (= endedAt), wfinstestado (= status).

Anything else returns 400 VALIDATION_ERROR, and the message names the accepted values. Until 2026-08-16 an unrecognised sort_by was silently ignored and the report came back in its default order, so a mis-typed column looked like it had worked.


Code Examples​

curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/reports/workflow/instances?startdate=2026-03-01T00:00:00&enddate=2026-03-31T23:59:59&limit=25"

Response​

Response Fields​

FieldTypeDescription
wfinstidstringInstance ID.
workflowNamestringWorkflow definition name.
entityTypestringLinked entity type (TAREA, CUENTA, CLIENTE, PERSONAL, DISPOSITIVO, NINGUNA).
entityIdstringLinked entity ID.
entityRefstringHuman-readable entity reference.
statusstringInstance status (e.g. RUNNING, COMPLETED, ERROR, CANCELLED).
startedAtstringInstance start timestamp.
endedAtstring | nullInstance end timestamp, or null if still running.
durationSecondsnumberTotal elapsed time in seconds (to end, or to now if running).
startedByNamestring | nullName of the user who started the instance.
taskCountnumberTotal tasks in the instance.
completedTaskCountnumberTasks already completed.

Example Response​

{
"success": true,
"data": [
{
"wfinstid": "748293048576123",
"workflowName": "Incident Resolution",
"entityType": "TAREA",
"entityId": "552398174620055",
"entityRef": "552398174620055",
"status": "COMPLETED",
"startedAt": "2026-03-04T09:12:00",
"endedAt": "2026-03-04T11:48:00",
"durationSeconds": 9360,
"startedByName": "Carlos Martinez",
"taskCount": 5,
"completedTaskCount": 5
}
],
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}

Errors​

CodeHTTPDescription
VALIDATION_ERROR400Invalid params: missing dates, range > 92 days, invalid enum values.
INVALID_DATE_RANGE400Date range invalid or greater than 92 days.
UNAUTHORIZED401Missing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403User lacks required permission.
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.