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": "63234780807e45eca52b067d",
"gbac": {
"write": [
"7595db6f20c32acc5471cc9d",
"ef161d9fd02a6558453955d2",
"4b9c68b1c22add705aa66bed",
"47536b8e4f5ac147f0f67764",
"4c74992b0260e275c6918cb2"
],
"read": [
"dc2d8142371280ca95397eae",
"5a6529e67f00d985e7954ec1",
"ecbcf35b78e2e4e0d173ee91",
"255adc6165a6b328d1f46e55"
]
},
"nextRunAt": "2019-11-25T22:51:39.201Z",
"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": "96cfa7e8364aa3e35b12b6f4",
"name": "test",
"data": {
"gbac": {
"write": [
"9d96a99bb3cd3a7455c6110f",
"b8d83ca131aa18e748ba4a7a",
"5451df7e787c149e37887406",
"4eddb73f3ad2abb4211535a0"
],
"read": [
"04f1b5b50f9ada27106228dc",
"150cfefff20b0ffbe0d47f61",
"c014b86d8860bde1bd7f41bd"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "dolore voluptate ut",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "67e578c3b503b76f5b878644"
},
"lastModifiedBy": "ex proident dolor quis",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "2 months"
}