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": "6ebac178a7ebc6e7316ff3c9",
"gbac": {
"write": [
"1bae33ab57694d37c88010fa",
"92f2370063edc2fdd3c05bca",
"69a386e326a01d278169ae31"
],
"read": [
"376e3ba9851162359ea40e8e",
"b69f9a9deec003b1840574ca",
"a04ad4b701f0111fbee20926"
]
},
"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": "eca632d42c3b3a5b6f1abdc1",
"name": "test",
"data": {
"gbac": {
"write": [
"e98c400ff0e27497be4da20b",
"46323a290eaf7dde6e6d7ed3",
"02412e2e89a6d949d81e7fb8",
"91fec6b1c21da6f809bc7d9e",
"169aad73912414239f948a64"
],
"read": [
"d35e612847fa596683fdd83d",
"bf8eb2e0e544f7f769adb578",
"42bcfc2d60827cda76d86bf0",
"a4761ddbc2d719fdaebed36d",
"72570744fd02d8a915bc5104"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "nostrud fugiat sed sit ea",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "4a7651fee75b953f71cc7c68"
},
"lastModifiedBy": "veniam Excepteur",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 hour",
"migratedToOM": true,
"correspondingOMAutomationId": "907b191a4fd6af4cb56a145c"
}