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": "8c5fc8a5a610cfb922f6b081",
"gbac": {
"write": [
"f2371621b636aabf83f520d3",
"36f63c0499f805aa4cb0b35e",
"66df223fdc73b40c1d5daa4d"
],
"read": [
"9a05262ab04aabf3ed74b2cd",
"eb02db3f32a6749a7a54b571",
"71edad1f9871417b3a94b12e",
"d8b5127d616450681d470c78"
]
},
"nextRunAt": "2019-11-25T22:51:39.201Z",
"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": "ec3adedfaa37b0f66194a69f",
"name": "test",
"data": {
"gbac": {
"write": [
"6c515305bf0758a726f69a51",
"fe50d74e18d209af73b146ec",
"6f5d5117d9c50622c2b92789",
"a9e8e69c66bae1b757747543"
],
"read": [
"a8792163c2c2ce5f0b32af05",
"e09c2fa17d03cbb376ae064c",
"4039a44eeb252e6e61f5e0b4"
]
},
"lastUpdated": "2019-11-25T22:51:39.201Z",
"description": "id velit proident adipisicing",
"workflowId": "8e3695fe-c5bf-4286-ae83-186b3fea1c1a",
"formId": "252e78cb79b7eebb7cd66c2b"
},
"lastModifiedBy": "occaecat mollit",
"lastRunAt": "2019-11-25T22:51:39.201Z",
"nextRunAt": "2019-11-25T22:51:39.201Z",
"repeatInterval": "3 weeks"
}