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": "19064cd527a95f1acb145486",
"gbac": {
"write": [
"526470df274b151d503596ed",
"357d824c7134e1b01ddad764",
"c442895d6b88a599b67a9629",
"df7600b9ed8882565726f047",
"38c252ec035c88a9bcc1b9cc"
],
"read": [
"b0f2fd3fc0c0f67f0f14cb92",
"11f84686e407d39b3394c3a5",
"0b297ec5d9c9465758b20fe3",
"640d93a2b8402589d48093ff"
]
},
"nextRunAt": null,
"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": "c7f80f184306c3e0dd1b2edc",
"name": "test",
"data": {
"gbac": {
"write": [
"0525c18b5a1c73a75823a6ed",
"6ad4242e429ac93525076200"
],
"read": [
"feae48b7dedffa04d939c784",
"cc95dedcfbd7d8a0a553c20e",
"2631f2d21e5e8eb28a2ba4b9",
"7a951cd5ed1632d40ed88eee",
"bb408a71a5d30069969d0b65"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "sint",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "a0d7ebe6f94059733e6c04d5"
},
"lastModifiedBy": "esse ea aliquip voluptate ut",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "3 weeks",
"migratedToOM": true,
"correspondingOMAutomationId": "3ca8ddda1eee7d09b60e0ce5"
}