Class

ProjectAutomations

ProjectAutomations(client, projectId)

Class corresponding to Aworks ProjectAutomations Endpoints
Constructor

# new ProjectAutomations(client, projectId)

Endpoint constructor
Parameters:
Name Type Description
client Client
projectId String The id of the project.
See:
  • [ProjectAutomations in Awork API Docs](https://openapi.awork.com/#/ProjectAutomations)

View Source endpoints/ProjectAutomations.js, line 11

Classes

ProjectAutomations

Methods

# actions(projectTemplateId) → {ProjectActions}

Returns the ProjectActions Endpoint with the specified project id and automation id.
Parameters:
Name Type Description
projectTemplateId String The id of the project template

View Source endpoints/ProjectAutomations.js, line 97

# async create(automation) → {Promise.<Automation>}

Creates a new automation for the project with the specified id. The user needs to be the owner of the project or have 'write' permissions of the feature 'project-master-data' globally or in the project.
Parameters:
Name Type Description
automation AutomationCreateModel The model to create an automation.

View Source endpoints/ProjectAutomations.js, line 57

Promise.<Automation>

# async delete(automationId) → {Promise.<Automation>}

Deletes the specified automation for a given project. Also deletes all actions connected to the automation. The user needs to be the owner of the project or have 'write' permissions of the feature 'project-master-data' globally or in the project.
Parameters:
Name Type Description
automationId String The id of the automation.

View Source endpoints/ProjectAutomations.js, line 86

Promise.<Automation>

# async get(automationId) → {Promise.<Automation>}

Returns a specific automation of the project with the specified id. Returns NotFound if the automation doesnt exist. To get the the automation data the user needs to be the owner of the project or have 'read' permissions of the feature 'project-master-data' globally or in his project role.
Parameters:
Name Type Description
automationId String The id of the automation.

View Source endpoints/ProjectAutomations.js, line 29

Promise.<Automation>

# async list(optionsopt) → {Promise.<Array.<Automation>>}

Returns all automations of the project with the specified id. To get the the automation data the user needs to be the owner of the project or have 'read' permissions of the feature 'project-master-data' globally or in his project role.
Parameters:
Name Type Attributes Description
options ListOptions <optional>
Pagination and filtering options.

View Source endpoints/ProjectAutomations.js, line 40

Promise.<Array.<Automation>>

# async update(automationId, automation) → {Promise.<Automation>}

Updates the automation with the specified id. The user needs to be the owner of the project or have 'write' permissions of the feature 'project-master-data' globally or in the project.
Parameters:
Name Type Description
automationId String The id of the automation.
automation AutomationUpdateModel The model to update an automation.

View Source endpoints/ProjectAutomations.js, line 75

Promise.<Automation>