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": "b7fcf4c6ba64c9ce2806c798",
"gbac": {
"write": [
"b1571c0b8fccf6a403c527c5",
"d2ae82545641b7343dca43b4"
],
"read": [
"3229a9e9b716abda9300a7fb",
"9eecdc8a6bb3e3324cd62df5",
"2f9d406492386cb2a822e761",
"e2704d065ba800826f5e3ccf"
]
},
"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": "88f3c0ce0c777ace492c85c7",
"name": "test",
"data": {
"gbac": {
"write": [
"c60b1fe3a5aab9b59afbe074",
"35913cd3b6203e9823bee856",
"56c598db7a890ab99d2d9e3c",
"1d9912914ce6ca748b0b1bae",
"10ab8de6e0e4c8d0e75214d5"
],
"read": [
"035aeff5d2eb6b529e2eb2e2",
"0c59aeac46daa27f8de19425",
"b7f27e64cf33b6ddde031f3b"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "nostrud anim nulla",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "be5100f314bafcd8ef5ab723"
},
"lastModifiedBy": "sint magna aliquip",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "2 months"
}