post https://app.fracttal.com/api/tasks_nonscheduled
With this API you can create an unscheduled task whose information is downloaded from a task by event.
Notes: -The event from which the data is brought, cannot have associated resources -To obtain the information related to the trigger and the task, it is necessary to consult the web service https://api.fracttal.com/reference/consultar-informaci%C3%B3n-detallada-de-planes-de-tareas
-This web service is part of the APIS ADVANCED add-on.
Input parameters
Parameter | Type | Required | Description |
---|---|---|---|
item_code | Text | Yes | Código del activo al que se le realizará la OT |
account_code | Text | Yes | Code of the human resource or third party with a Fracttal user account, who will be registered as the creator of the WO. |
requested_by | Text | Yes | Requested by |
id_task | Number | Yes | Id of the task from which the information to create the TO will be obtained. |
tasks_triggers_id | Number | Yes | Event ID |
id_group_task | Number | Yes | Id of the task list where the task from which the information will be obtained is located. |
task_descripcion | Text | Optional | Task description (Default is the task name of the id_task) |
task_type_main | Text | Optional | Task type (Default is id_task task) |
task_type_description | Text | Opcional | Rank 1 of task (Default is from id_task task) |
task_type_2_description | Text | Optional | Task classification 2 (Default is from the id_task task) |
event_date | Date | Optional | Date on which the event occurred (Default is the current date).Format: YYYYY-MM-DDTHH:MM:SS-UTC Example: 2021-07-12T20:00:00:00-03. |
date_maintenance | Date | Optional | Date on which the task is to be performed (Default is the current date). Format: YYYYY-MM-DDTHH:MM:SS-UTC Example: 2021-07-12T20:00:00-03. |
asset_failure | Boolean | Optional | Valor que indica si falló el activo. False por defecto |
failure_type | Text | Optional | Fault description |
failure_cause | Text | Optional | Description of the cause of failure |
failure_detection_method | Text | Optional | Description of the fault detection method |
id_failure_severity | Number | Optional | Failure severity id 1: Very Low 2: Low 3: Medium 4: High 5: Very High |
id_damage_type | Number | Optional | Type of damage caused: 1: None 2: Damage to the environment 3: Damage to facilities 4: Injury to internal personnel 5: Injury to third parties 6: Other |
asset_out_of_service | Boolean | Optional | value to indicate whether the task has an associated out-of-service. False by default |
date_asset_out_of_service | Date | Optional | Date of inception of out of service |
**Send the required fields and the parameters with the additional values you wish to insert.
Output parameters
Parameter | Type | Description |
---|---|---|
id_todo | Number | Task ID in the To-do module |
id_task | Number | Task ID |
date_created | Date | Date of creation of the WO |
created_by | Text | Name of the user who is listed as the creator of the WO |
Example:
Request: (POST) https://app.fracttal.com/api/tasks_nonscheduled
{
"item_code": "118",
"account_code": "25198772-2",
"requested_by": "FRACTTAL SPA",
"id_task": 86,
"task_descripcion": "Nueva tarea generada por API",
"tasks_triggers_id": 27,
"id_group_task": 1,
"task_type_main": "CORRECTIVA",
"task_type_description": "MECÁNICA",
"task_type_2_description": "REQUIERE PERMISO ALTURA",
"date_maintenance": "2021-09-30T21:16:29.870548+00:00",
"asset_failure": "true",
"failure_type":"COMPRESOR DAÑADO",
"failure_cause":"CIRCUITO CORTADO",
"failure_detection_method":"INSPECCIÓN VISUAL",
"id_failure_severity": 3,
"id_damage_type":1,
"asset_out_of_service": "true"
}
{
"success": true,
"message": "200",
"data": {
"id_todo": 1600093,
"id_task": 455912,
"date_maintenance": "2021-05-28T21:16:29.870548+00:00",
"date_created": "2021-05-27T23:06:34.525633+00:00"
},
"total": 1
}
Test it