Summary
Updates an automation's attributes.
Description
Updates an automation's attributes (including scheduling data).
Route
PUT /automation_catalog/automations/:id
Roles
admin
other
apiread
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
id |
string |
yes |
Unique id of the automation |
options |
object |
yes |
Object containing the fields to be updated |
Copied to Clipboard
{
"options": {
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "db3d804b150cf98a5a08158d",
"gbac": {
"write": [
"0b08edbba9f1cf2cf3210898"
],
"read": [
"d09d87a7a021db3967fc063f",
"ecb1526b4432d09b2d1d8fef",
"14cdac38315adfd8d45d1b58",
"f27fd988ec42c30774ba00b2"
]
},
"nextRunAt": null,
"repeatInterval": "1 day"
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"options": {
"title": "options",
"type": "object",
"description": "Custom data stored with an automation.",
"properties": {
"formData": {
"type": "object",
"properties": {},
"description": "An object containing a list of properties from the associated json-form, saved formData is only used when scheduling."
},
"workflowId": {
"type": "string",
"examples": [
"8e3695fe-c5bf-4286-ae83-186b3fea1c1a"
],
"format": "uuid"
},
"formId": {
"$ref": "automationDocument#/definitions/ObjectId"
},
"gbac": {
"type": "object",
"description": "Sets of group Ids that are allowed to access this automation.",
"properties": {
"write": {
"type": "array",
"description": "Group ids that have write access to the automation document.",
"items": {
"$ref": "automationDocument#/definitions/ObjectId"
}
},
"read": {
"type": "array",
"description": "Group ids that have read access to the automation document.",
"items": {
"$ref": "automationDocument#/definitions/ObjectId"
}
}
},
"required": [
"write",
"read"
]
},
"nextRunAt": {
"oneOf": [
{
"type": "string",
"examples": [
"2019-11-25T22:51:39.201Z"
],
"format": "date-time",
"description": "Agenda property defining when the next run will process, stored in UTC."
},
{
"type": "null"
}
]
},
"repeatInterval": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"description": "Agenda property defining how often an automation will repeat. Stored in human interval time format (https://github.com/agenda/human-interval).",
"examples": [
"1 hour",
"1 day",
"3 weeks",
"2 months"
]
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"options"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
document |
object |
Updated document of requested automation |
Copied to Clipboard
{
"_id": "1a0eb40afd7b20739a7c04e3",
"name": "test",
"data": {
"gbac": {
"write": [
"1f7ce14fb6f824333fae98ab",
"ae63843ef980e86341779e3d"
],
"read": [
"1353c8a45e9671b81c42e426",
"3e43978577c2d30e501192b4",
"19a7d54e63e6364c64957a80",
"faada4f5fd7dcccdef9108a9",
"8b5ca40f1f691412756e1c02"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "quis Lorem in ut commodo",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "abc26134fc0ed6dbae2af679"
},
"lastModifiedBy": "cupidatat ullamco",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 day",
"migratedToOM": false,
"correspondingOMAutomationId": "19f03a3d62bd79bddbb3d611"
}