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": "6fb1edd1e6091a3a50ace156",
"gbac": {
"write": [
"d57fbd0f6d2afa6df23296a7",
"e34973b1f48bed8a12a90e4b",
"ad095f7ee4c9d883265a90a7"
],
"read": [
"f516a9513918584d83ed02c0",
"c04eebdd3506c2ebb64e15b8",
"a7cf5f0da55b3275e0c2eb1b",
"9f910dac7f394cbde3e42444"
]
},
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 hour"
}
}
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": "1d5e29095108794fa4657935",
"name": "test",
"data": {
"gbac": {
"write": [
"5e70ff82883dd0dae8eb8249"
],
"read": [
"5508bf1a9acd4e0246149953",
"fb52e84ea78f471b8d402d93",
"e564963abb6ed1d1d8475df7",
"70decbf0e93ff3129469855f"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "aliqua Lorem",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "2929ab819abc910f5a926ccf"
},
"lastModifiedBy": "elit",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "1 hour",
"migratedToOM": true,
"correspondingOMAutomationId": "d8cd1b940719cb1d903b1a04"
}