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": "5c5ca73bd1784d2231c63597",
"gbac": {
"write": [
"0c92eed06f675c30dd591e14",
"2961f161c24179709089bc21",
"761b5c6c5ea027677a9dac52",
"f85b1e6b546c982bdaab071f"
],
"read": [
"7e4e703cae453caab7297489",
"2b640e4aeedac9e28df5c02e",
"a8f0e04a321b001785166172",
"46b8ae740ae12689e7af284a",
"8534bbd0681a5b8de63fc884"
]
},
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": null
}
}
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": "d7ff49a6ad06fa5c8f416118",
"name": "test",
"data": {
"gbac": {
"write": [
"54e80bdd40711e8f6237f4b3",
"bd3b27bd6d4b6f8635f3e111",
"a0c48121665a20747a65a75f",
"9ae4534ca7550c6df900233a",
"2faf74097d64acdc443c7a9f"
],
"read": [
"d4dd155be9decc484b8370dc",
"6970724a16972dad64fc2988",
"bdc221528011eb6e2de3fd9c",
"b6a582d51fac6cfd7f98110b",
"41e4b6e800eab3c506a44f05"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "eiusmod laborum nisi mollit Ut",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "d0cc08e2affe87cac8b8d3f2"
},
"lastModifiedBy": "enim ut do minim",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 day",
"migratedToOM": false,
"correspondingOMAutomationId": "1aed35c767ac465dba47c3c8"
}