Updates the automation with the specified id for a given projecttemplate.

PUThttps://api.awork.com/api/v1/projecttemplates/{projectTemplateId}/automations/{automationId}
PUT https://api.awork.com/api/v1/projecttemplates/{projectTemplateId}/automations/{automationId}

Updates the specified automation for a specific projecttemplate. If the automation was created from a workflow, only the Enabled flag can be changed.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Path parameters

automationIdstringRequired
format: uuid

The automation ID.

projectTemplateIdstringRequired
format: uuid

The project template ID.

Request body Required

The requested state and trigger.

application/json

enabledbooleanRequired

Whether the automation is enabled.

triggerobjectRequired
Show 2 properties
typestringRequired
minLength: 1

The type of the trigger.

valuesarray of object or nullOptional

The values of the trigger.

Show 2 properties
namestringRequired
minLength: 1

The name of the trigger value.

valueanyRequired

The value of the trigger value.

Responses

200 OK

application/json

idstringOptional
format: uuid

The id of the automation.

createdBystringOptional
format: uuid

The id of the user who created the automation.

createdOnstringOptional
format: date-time

The date the automation was created.

updatedBystringOptional
format: uuid

The id of the user who updated the automation.

updatedOnstringOptional
format: date-time

The date the automation was updated.

triggerIdstringOptional
format: uuid

The id of the trigger which is related to the automation.

triggerobjectOptional
Show 3 properties
updatedOnstringOptional
format: date-time

The date the trigger was updated.

typestring or nullOptional

The type of the trigger.

valuesarray of object or nullOptional

The values of the trigger.

Show 2 properties
namestring or nullOptional

The name of the trigger value.

valuestring or nullOptional

The value of the trigger value.

enabledbooleanOptional

Whether the automation is enabled.

statestring or nullOptional

The state of the automation. See AutomationsService.DAL.Models.AutomationState for the possible values.

createdByProjectTemplatebooleanOptional

Whether the automation was created from an automation template of a project template.

projectIdstring or nullOptional
format: uuid

The id of the project which is related to the automation.

projectTemplateIdstring or nullOptional
format: uuid

The id of the project template which is related to the automation.

actionsarray of object or nullOptional

The actions which is related to the automation.

Show 8 properties
idstringOptional
format: uuid

The id of the action.

createdBystringOptional
format: uuid

The id of the user who created the action.

createdOnstringOptional
format: date-time

The date the action was created.

updatedBystringOptional
format: uuid

The id of the user who updated the action.

updatedOnstringOptional
format: date-time

The date the action was updated.

typestring or nullOptional

The type of the action.

ordernumber or nullOptional
format: double

The order of the action.

valuesarray of object or nullOptional

The values of the action.

Show 2 properties
namestring or nullOptional

The name of the action value.

valuestring or nullOptional

The value of the action value.

workflowIdstring or nullOptional
format: uuid

The workflow this automation belongs to, if any.

createdByAutomationIdFromWorkflowstring or nullOptional
format: uuid

The id of the workflow automation that served as the template for this automation.

failedobjectOptional

The API error response.

Show 6 properties
codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

400 Bad Request

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation