With thousands of users choosing Comala Workflows to manage their reviews and approvals it’s only natural that developers would like to make use of that workflows activity in their own projects. Comalatech provide a REST API that gives developers access to a variety of workflows data that can be used inside and outside of Confluence.

No matter whether a Workflow is applied to a page or blog, the API can generate information about it. What information exactly? The API includes almost every Workflows activity:

  • Current state: information about the current state of a page
  • Current Workflow: properties, states and triggers defined in workflows applied to pages
  • Available Approvals: information about the existing approvals in the current state of a page
  • Workflow States: information about all the workflow states such as how transitions between them are defined
  • Workflow Actions: all the approval, state change and workflow parameter edit actions that are available in the current
    page status and taking into account the user that requested the information
  • Tasks: information about the existing tasks on a page with its assignees

 

Apart from the information mentioned above, workflow-related messages are also sent through this endpoint, including those put in place by the set-message action macro.

But, the REST API is not only about getting information, it also allows you to perform some of the actions that normally happen via the UI. These actions include:

  • Approving or rejecting approvals
  • Assigning or unassigning users to/from an approval
  • Changing the state
  • Setting or updating an expiry date in the current state
  • Updating workflow parameter values on the page (if these are editable)

These are the current available REST API endpoints, but over time we are gradually updating it by adding new actions, such as those related to Workflows tasks.

This functionality allows for some really interesting possibilities. For example, you could use a Jira scripting app, like Power Scripts or Scriptrunner, to transition a document from “Waiting for Release” to “Review Documentation” when a Jira issue has been solved. The script would utilize the API to interact with workflows automatically, and could be replicated as often as necessary.

It’s important to note that our REST API isn’t the only method for getting Workflows data out of Confluence. It is possible to use the default Confluence API to retrieve some of the workflow fields/filtering. To learn more about the Advanced CQL search capabilities of the Confluence API, please click here.

We’ve seen other Atlassian Marketplace vendors take advantage of the data provided by our REST API, but there’s also Workflows customers who have custom-built internal products that make use of the API. If you’re using our REST API in a unique way, we’d love to hear about it! Please send an email mike@comalatech.com . Want to learn more about what you can do with our API? Check out our documentation here.