Through this API you can query the list of tasks created in your company. Both tasks that belong to a task plan and unplanned tasks are listed.
Input parameters
The following input parameters are optional and are used to paginate the query.
By default, the Fracttal API returns only 100 records.
| Parameter | Type | Required | Description |
|---|---|---|---|
id_group_task | Integer | Optional | Task plan number |
start | Integer | Optional | Initial record number that the query will display. |
limit | Integer | Optional | Final record number that the query will return. |
This API supports dynamic filtersIn addition to
id_group_task,startandlimit, you can filter by any task field using thefield[operator]=valuenotation (for exampledescription[like]=maintenanceoris_active[eq]=true). Theid_group_taskparameter works the same as before and can be combined with the new filters. See the available operators and usage examples in Dynamic filters.
Output parameters
| Parameter | Type | Description |
|---|---|---|
id_group_task | Integer | Id of the task plan the task belongs to. Null if it is an unplanned task |
duration | Integer | Task duration in seconds |
description | Text | Task description |
is_active | Boolean | Indicates whether the task exists. Always returns true. It does not reflect whether the task is paused within its plan; use is_plan_active for that. |
is_plan_active | Boolean | Indicates whether the task is active or paused within its plan. true = the task is active. false = the task was paused within the plan. |
stop_assets | Boolean | True if the asset is stopped, false otherwise |
stop_assets_sec | Integer | Asset downtime in seconds |
priorities_description | Text | Priority description |
groups_tasks_description | Text | Task plan description |
tasks_types_description | Text | Task classification 1 |
tasks_types_main_description | Text | Task type |
note | Text | Task note |
requested_by | Text | Requested by |
id_request | Integer | Request id |
num_iterations | Integer | Number of iterations |
is_cyclical | Boolean | Whether it is a cyclical task |
name_iterations | JSON | Content of the iterations of cyclical tasks |
How to tell whether a task is pausedTo find out whether a task is paused, check
is_plan_active.is_activedoes not change when a task is paused or resumed.
Example:
Request: (GET)https://app.fracttal.com/api/tasks/
{
"success": true,
"message": "200",
"data": [
{
"id": 255,
"id_company": 914,
"id_group_task": 2,
"id_priorities": 3,
"id_task_type_main": 14,
"id_task_type": null,
"id_task_type_2": null,
"duration": 600,
"description": "60 PUNTOS",
"is_active": true,
"is_plan_active": true,
"stop_assets": false,
"stop_assets_sec": null,
"tasks_types_2_description": null,
"priorities_description": "MEDIUM",
"groups_tasks_description": "PLAN DE MANTENIMIENTO CAMIÓN FREIGHTLINER M102",
"tasks_types_description": null,
"tasks_types_main_description": "INSPECCIÓN",
"tasks_types_main_color": null,
"note": null,
"requested_by": null,
"id_request": null,
"is_configured": true,
"event_date": null,
"num_iterations": null,
"is_cyclical": null,
"name_iterations": {}
},
{
"id": 1676537,
"id_company": 914,
"id_group_task": 45623,
"id_priorities": 3,
"id_task_type_main": 14,
"id_task_type": null,
"id_task_type_2": null,
"duration": 600,
"description": "60 PUNTOS",
"is_active": true,
"is_plan_active": true,
"stop_assets": false,
"stop_assets_sec": null,
"tasks_types_2_description": null,
"priorities_description": "MEDIUM",
"groups_tasks_description": "PLAN DE MANTENIMIENTO CAMIÓN MIXER",
"tasks_types_description": null,
"tasks_types_main_description": "INSPECCIÓN",
"tasks_types_main_color": null,
"note": null,
"requested_by": null,
"id_request": null,
"is_configured": true,
"event_date": null,
"num_iterations": null,
"is_cyclical": null,
"name_iterations": {}
},
{
"id": 1424185,
"id_company": 914,
"id_group_task": 39840,
"id_priorities": 3,
"id_task_type_main": 14,
"id_task_type": null,
"id_task_type_2": null,
"duration": 600,
"description": "60 PUNTOS",
"is_active": true,
"is_plan_active": false,
"stop_assets": false,
"stop_assets_sec": null,
"tasks_types_2_description": null,
"priorities_description": "MEDIUM",
"groups_tasks_description": "PLAN DE MANTENIMIENTO CAMIÓN MIXER",
"tasks_types_description": null,
"tasks_types_main_description": "INSPECCIÓN",
"tasks_types_main_color": null,
"note": null,
"requested_by": null,
"id_request": null,
"is_configured": true,
"event_date": null,
"num_iterations": null,
"is_cyclical": null,
"name_iterations": {}
},
{
"id": 3363315,
"id_company": 914,
"id_group_task": 87029,
"id_priorities": 3,
"id_task_type_main": 14,
"id_task_type": null,
"id_task_type_2": null,
"duration": 600,
"description": "60 PUNTOS",
"is_active": true,
"is_plan_active": true,
"stop_assets": false,
"stop_assets_sec": null,
"tasks_types_2_description": null,
"priorities_description": "MEDIUM",
"groups_tasks_description": "PLAN DE MANTENIMIENTO BUS",
"tasks_types_description": null,
"tasks_types_main_description": "INSPECCIÓN",
"tasks_types_main_color": null,
"note": null,
"requested_by": null,
"id_request": null,
"is_configured": true,
"event_date": null,
"num_iterations": null,
"is_cyclical": null,
"name_iterations": {}
},
{
"id": 336,
"id_company": 914,
"id_group_task": null,
"id_priorities": 3,
"id_task_type_main": 14,
"id_task_type": 24,
"id_task_type_2": null,
"duration": 600,
"description": "60 PUNTOS ( Tarea No Planificada )",
"is_active": true,
"is_plan_active": true,
"stop_assets": false,
"stop_assets_sec": null,
"tasks_types_2_description": null,
"priorities_description": "MEDIUM",
"groups_tasks_description": null,
"tasks_types_description": "PROYECTO 02",
"tasks_types_main_description": "INSPECCIÓN",
"tasks_types_main_color": null,
"note": "",
"requested_by": "miguel",
"id_request": null,
"is_configured": true,
"event_date": "2020-07-20T20:30:00+00:00",
"num_iterations": null,
"is_cyclical": null,
"name_iterations": null
}
],
"total": 5
}OpenAPI definition
{
"openapi": "3.1.0",
"info": {
"title": "consultar-tareas",
"version": "2-En"
},
"servers": [
{
"url": "https://app.fracttal.com/api/tasks/"
}
],
"security": [
{}
],
"paths": {
"/": {
"get": {
"summary": "Query tasks",
"description": "",
"operationId": "consultar-tareas",
"security": []
}
}
},
"x-readme": {
"headers": [],
"explorer-enabled": false,
"proxy-enabled": true
},
"x-readme-fauxas": true
}