Workflow REST API

You can use the Workflow REST API to programmatically interact with workflows, for example starting new workflows, retrieving workflow tasks, and completing workflow tasks.

You will need to enable the Workflow API through the K2 Management site before the REST API will be available, please see Configuring the Workflow REST API in the user guide for more information on enabling the endpoint as well as list of the available endpoints and their descriptions .

The Workflow REST API provides a downloadable JSON (Swagger ) file, which you can download from the Management Site where the API is enabled, as shown below. You can parse this JSON file for documentation about the various endpoints, methods and properties exposed by the API. You can also click the Open Link button to launch the swagger documentation interface for the API, where you will be able to test the methods exposed by the API as well.

The URL for the REST API is specific to your K2 environment, and is shown in the Base URL field. You will need to use this URL in your code to when interacting with the API.

You can find code samples that demonstrate how to use this API in the Workflow REST API Code Samples topic.

Considerations