Summary
Updates an automation's attributes.
Description
Updates an automation's attributes (including scheduling data).
Route
PUT /automation_catalog/automations/:id
Roles
admin
other
readonly
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": "1d5a6fbfd7181503698f5f4c",
"gbac": {
"write": [
"4cb1d9d7808124e1cee6cd65",
"c7b635de36aa9ba32a697759",
"4316cf250e2edf9e68e04c40",
"36143f3abb0504ae40b64547",
"6560a96f8f8c55d1127966e0"
],
"read": [
"d2248f389929bf2caa0f4bf0",
"289a00dcf4ac9f29f108a350"
]
},
"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": "eee1d60f2bdf53e8cdee0b3f",
"name": "test",
"data": {
"gbac": {
"write": [
"ada355def2330cd56b6bde74",
"fe604207996fea6313ef8ffc",
"237892e093f4db96a08fc6ea",
"00ebc686ccfd613a99133a30"
],
"read": [
"fe8bf3861860a22c68e3ccd2",
"ba5bfa90f0f5b98797cff99c",
"83e2045522eacfc063c95fd5"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "cillum adipisicing",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "01218e0a1422b7195cceaa9c"
},
"lastModifiedBy": "culpa dolor",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 hour"
}