automation-start-endpoint
automation-start-endpoint
Purpose
This automation starts an automation given the name of a trigger endpoint, as well as optional form data if desired.
automation-start-endpoint
API used:
/operations-manager/triggers/endpoint/:trigger_name
Input
| Inputs | Data Type | Sample Input | Description |
|---|---|---|---|
| instance_name | Dropdown (String) | SE Lab Prod 2023.1 | The Itential Platform instance name |
| trigger_name | String | test_form_trigger | Name of the trigger |
| data (optional) | JSON | { "formData":{ "OS-Type": "cisco-ios", "severity":"HIGH" } } | Form data as per the schema being used by the trigger. Note: Refer to the sample input to structure the JSON object in the same format |
| token (optional) | string | 9f0999c2-7054-4820-8eeb-c3052d30acaa | Authentication token or empty if an API key is used |
Output
| Output | Data Type | Sample Output | Description |
|---|---|---|---|
| automation_response | JSON | Sample outputs shown below. | Returns a JSON object with the start status of the automation |
| job_id | String | 4278c701b83943b08a98*** | The Job ID of the automation that was started |
Sample 1 - Output
1 { 2 "taskId": "workflow_start", 3 "owner": "Pronghorn", 4 "iterations": [], 5 "transitions": { 6 "success": [ 7 { 8 "task": "6e4c", 9 "type": "standard" 10 }, 11 { 12 "task": "30e5", 13 "type": "standard" 14 } 15 ] 16 }, 17 "workflow_end": { 18 "name": "workflow_end", 19 "groups": [], 20 "x": 1, 21 "y": 0.5, 22 "status": "incomplete", 23 "previous": { 24 "incomplete": [ 25 "ec30" 26 ], 27 "complete": [], 28 "error": [] 29 } 30 } 31 }
Sample 2 - Output
1 { 2 "taskId": "workflow_end", 3 "owner": "Pronghorn", 4 "iterations": [], 5 "transitions": {}, 6 "endTasks": { 7 "incomplete": [ 8 "30e5" 9 ], 10 "complete": [], 11 "error": [] 12 }, 13 "ec30": { 14 "name": "stub", 15 "canvasName": "stub", 16 "summary": "Stub", 17 "description": "Create a stub for an automated task", 18 "location": "Application", 19 "locationType": null, 20 "app": "WorkFlowEngine", 21 "type": "automatic", 22 "displayName": "Tools", 23 "variables": { 24 "incoming": { 25 "type": "success", 26 "delay": "$var.6e4c.result", 27 "response": "ok" 28 }, 29 "outgoing": { 30 "response": null 31 }, 32 "error": "", 33 "decorators": [] 34 }, 35 "deprecated": false, 36 "groups": [], 37 "actor": "Pronghorn", 38 "x": 0.4454901960784314, 39 "y": 0.4226254002134472, 40 "scheduled": false, 41 "status": "incomplete", 42 "previous": { 43 "incomplete": [ 44 "6e4c" 45 ], 46 "complete": [], 47 "error": [] 48 } 49 } 50 }
Sample 3 - Output
1 { 2 "taskId": "ec30", 3 "owner": "Pronghorn", 4 "iterations": [], 5 "transitions": { 6 "success": [ 7 { 8 "task": "workflow_end", 9 "type": "standard" 10 } 11 ] 12 }, 13 "6e4c": { 14 "name": "parseInt", 15 "canvasName": "parseInt", 16 "summary": "Converts a string to an integer.", 17 "description": "Parses a string argument and returns an integer of the specified radix or base.", 18 "location": "Application", 19 "locationType": null, 20 "app": "WorkFlowEngine", 21 "type": "automatic", 22 "displayName": "Number", 23 "variables": { 24 "incoming": { 25 "str": "$var.job.time", 26 "radix": "" 27 }, 28 "outgoing": { 29 "result": null 30 }, 31 "error": "", 32 "decorators": [] 33 }, 34 "deprecated": false, 35 "groups": [], 36 "actor": "Pronghorn", 37 "x": 0.16705882352941176, 38 "y": 0.3575240128068303, 39 "scheduled": false, 40 "retrySettings": null, 41 "status": "running", 42 "previous": { 43 "incomplete": [], 44 "complete": [], 45 "error": [] 46 } 47 } 48 }
Sample 4 - Output
1 { 2 "taskId": "6e4c", 3 "owner": "Pronghorn", 4 "iterations": [], 5 "transitions": { 6 "success": [ 7 { 8 "task": "ec30", 9 "type": "standard" 10 } 11 ] 12 }, 13 "30e5": { 14 "name": "parseInt", 15 "canvasName": "parseInt", 16 "summary": "Converts a string to an integer.", 17 "description": "Parses a string argument and returns an integer of the specified radix or base.", 18 "location": "Application", 19 "locationType": null, 20 "app": "WorkFlowEngine", 21 "type": "automatic", 22 "displayName": "Number", 23 "variables": { 24 "incoming": { 25 "str": "$var.job.endtime", 26 "radix": "" 27 }, 28 "outgoing": { 29 "result": null 30 }, 31 "error": "", 32 "decorators": [] 33 }, 34 "deprecated": false, 35 "groups": [], 36 "actor": "Pronghorn", 37 "x": 0.18745098039215685, 38 "y": 0.5827107790821772, 39 "scheduled": false, 40 "retrySettings": null, 41 "status": "running", 42 "previous": { 43 "incomplete": [], 44 "complete": [], 45 "error": [] 46 } 47 } 48 }
Sample 5 - Output
1 { 2 "taskId": "30e5", 3 "owner": "Pronghorn", 4 "iterations": [], 5 "transitions": {}, 6 "font_size": 12, 7 "last_updated": "2023-07-20T15:46:38.473Z", 8 "last_updated_by": "6475f9fe2d6fb91936274693", 9 "lastUpdatedVersion": "5.44.64-2022.1.33.0", 10 "groups": [ 11 "default" 12 ], 13 "created": "2023-07-20T15:46:38.664Z", 14 "created_by": "6475f9fe2d6fb91936274693", 15 "createdVersion": "5.44.64-2022.1.33.0", 16 "tags": [], 17 "description": "(Started from Operations Manager) API trigger", 18 "status": "running", 19 "variables": { 20 "time": "10", 21 "endtime": "20", 22 "_id": "8d887c9ad8a54569b3a44849", 23 "initiator": "snow-token" 24 }, 25 "watchers": [ 26 "63fc02eed99e7739b84b660e" 27 ], 28 "ancestors": [ 29 "8d887c9ad8a54569b3a44849" 30 ], 31 "decorators": [], 32 "metrics": { 33 "start_time": 1690904550118, 34 "user": "63fc02eed99e7739b84b660e", 35 "progress": 0 36 }, 37 "metadata": {} 38 }
Error Output
| Error Output | Data Type | Sample Output | Description |
|---|---|---|---|
| error_message | String | Method failed: (/operations-manager/automations) with code: 401 - Invalid username/password combination | Error message |