Summary
Updates an automation's attributes.
Description
Updates an automation's attributes (including scheduling data).
Route
PUT /automation_catalog/automations/:id
Roles
admin
other
readonly
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": "1773e652a146ef00a808441c",
"gbac": {
"write": [
"9f5a8a8001613fe416c919de",
"38e923cbe5625907761d57b8",
"62eef33887503171f0df9d37",
"1dec12d60b18e7924f65dd34"
],
"read": [
"fb050231be45407a30b4298b",
"60bcf62e0d8918133fa09f39",
"c739cb61a97a3d97fd0b54e0",
"2377c202d68bfa0ab4c05adc"
]
},
"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": "1e5e617237d754ac05b131f4",
"name": "test",
"data": {
"gbac": {
"write": [
"e4d948bc79766e8208d58e92",
"7ed1390aa3da10f635525ce1",
"6ab1a29049a4f588720bc12f"
],
"read": [
"792c248f6e42130f6c536f4f",
"9fb2990460922bd9357aed80",
"298b307b2fea065ce690d011",
"7afa3c176df49df87bbaea27",
"d900af299afbdc2d07db1ee4"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "ipsum",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "2c208be46bbb2fb784588484"
},
"lastModifiedBy": "aliquip non",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 hour"
}