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": "32cc7cabcd86db041d04496b",
"gbac": {
"write": [
"90f6bddf6334f66b4ff80534",
"90a4aeecc2bb40697595746b",
"23325662e7e9beacd2fa35cd"
],
"read": [
"ce61b78ffd5c64c043babd77",
"b0ee71d28dc317fac967d1fa"
]
},
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "3 weeks"
}
}
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": "5bf6ad5a97d86e1c96d00c0c",
"name": "test",
"data": {
"gbac": {
"write": [
"8cbe8cc00ec968870913ff59",
"c5ed573352024a5bb3bdd708",
"f16ce6bd926a09c07a5d9473"
],
"read": [
"fcc986e2b7c7c30f2e262aff",
"a5a8692209a54bf6577f26ce",
"65e92e7ea54d98b5601d4cdd",
"47f94d58460207e2c793d574",
"98e8bfb6b0f1a24ed39f3def"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "dolore aliquip",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "becdc1e1f7f9e05f806a89a4"
},
"lastModifiedBy": "amet officia commodo",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "3 weeks",
"migratedToOM": false,
"correspondingOMAutomationId": "6d57c4efddbef422ae781f4b"
}