1. Welcome
Welcome to the FlowWright REST API Guide. This guide describes how to configure and use FlowWright’s REST API.
What is a REST API?
REST APIs are web APIs hosted on a web server that can be accessed from any platform. The platform could be a tool, a different technology, or even a completely different operating system. REST utilizes the HTTP or HTTPS protocol to make requests to the web server or the application server. REST calls send a request object, and the server processes the call and returns a response object.
1.1 Installation
The REST API is installed and configured automatically through the FlowWright installer; it is part of the FlowWright UI. In previous versions of FlowWright, it used to be separate but not all integrated. You can access the REST API using the following URL:
The above URL also shows the Swagger documentation for the REST API.
API Security
The REST API is secured using 3 authentication mechanisms, you can use any of them, and they are:
- Basic
- API token
- oAuth
Basic Authentication
If using FlowWright's authentication, pass the username and password. If using other authentication, like Windows, SAML, etc., where FlowWright does not store a password for the user, use the FlowWright license key as the password. The license key can be found in the FlowWright UI under Status → License.
Token Authentication
Reference the Token authentication document
oAuth Authentication
Reference the oAuth authentication document
REST API
The next few sections will show you how to access the REST API using various methods.
Accessing using REST API Site
The REST API provides a website with documentation through Swagger; here’s how to access this site. Navigate to the following URL:
The site should be rendered as follows:
As you can see from the list, each call is identified with its HTTP method, GET, DELETE, or POST, and its description. You can expand any of the calls and test them using the UI.
Calling a REST API call with authentication
Let’s test a REST API call that requires authentication. Navigate to the class called “User/GetUser”.
Click the Button to test the REST API call. The above UI is displayed; enter “admin” for the user name or ID field and click the “Execute” button. Since this call requires authentication, the following authentication dialog will appear.
If the authentication is successful, then the following response will be displayed:
If authentication was not successful, then you will see the following response.
More complex REST API calls
Some REST API calls are simple, and some are more complex, depending on functionality. Complexity is based on input parameters and their data structure. Here’s the REST API call to create and execute a process instance using a process definition.
Multitenant REST API
FlowWright API is also supported in Multitenant environments.
The URL is the same as that used to make a REST API call, but the tenant name is in front of the URL.