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": "74db6fcdc8086842baaa4eb4",
"gbac": {
"write": [
"783de2f7a5762d50b26b9d45",
"e3948dc36a03fe03b0a1b8db"
],
"read": [
"f2fcae158bf12c4a7dcbce0f",
"51852b5d64356f265a58e782",
"057d83129295e881ea1fe058",
"4475b3c3d86253a467b70ada",
"2090267be14575837844966c"
]
},
"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": "7ae1838648b7b839d867d38e",
"name": "test",
"data": {
"gbac": {
"write": [
"420bbc9e8bde70d380909e9d",
"76a5f6b474f8bb69685e07cd",
"8a2d93368ecd09a99924abf1",
"9e1e21ad092edcf60d1a8cc7"
],
"read": [
"cbab2d934e3af00c2725a1c0",
"607feb7f91273bf8528a893b",
"3b2fd845a16138aa1bae197d",
"8a43d76d7ea0bf91a17ba296"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "pariatur",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "93eb650ac1d0ad62fbb2e5c7"
},
"lastModifiedBy": "ullamco proident",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "3 weeks"
}