Workflow API serves to interact with process instances and some other auxiliary operations of Workflow Server (for example, working with users, stopping timers in a server instance, etc.). The comprehensive Workflow API documentation is included in the server admin.
This page contains a list of all Workflow API methods available, forms for test requests, and code examples that can be copied and pasted directly into your application.
By default, the access to Workflow API is not restricted in any way. The access settings are available in the admin panel on the Dashboard page.
First, let us describe the process of obtaining an access token manually. This is essential to understand the method, but, as a rule, it is recommended to use ready-made libraries.
Open this address in your browser http://localhost:8077/.well-known/openid-configuration to receive JSON with the addresses of all endpoints of the identity server.
In this JSON, you are interested in the address "token_endpoint":http://localhost:8077/connect/token.
To obtain a Workflow API access token, a request should be sent to this address with the following parameters:
Example Request:
POST /connect/token HTTP/1.1
Host: localhost:8077
Content-Type: application/x-www-form-urlencoded
Content-Length: 194
client_id=workflowapi&client_secret=fc9rmnuvwR6Nsbfg0H9hAxqz9OrUhK3CFjLNNj0HC7mBWT02QmyikLhk7gxQIEllCFt6Fj1Kjvf7wkgB4sXOykZUdpGuRNhWm5goUYSNF8VcL5a1Na4OcOwHMaNNAjrB&grant_type=client_credentials
JSON is obtained in response. The access_token property should be taken from it.
The access_token obtained must be used with each request to Workflow API.
Example Request:
POST /workflowapi/createinstance/f54104f0-5de2-ea7b-e3be-47c9199a3967 HTTP/1.1
Host: localhost:8077
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkRDQTJFMTI2Nzg4QkY2RjZFQjU3MDY4NjAwQzc3RENDMzlFRkNGRTRSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6IjNLTGhKbmlMOXZiclZ3YUdBTWQ5ekRudnotUSJ9.eyJuYmYiOjE2MDY5ODgyMDUsImV4cCI6MTYwNjk5MTgwNSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDc3IiwiYXVkIjoiV29ya2Zsb3dBcGkiLCJjbGllbnRfaWQiOiJ3b3JrZmxvd2FwaSIsImp0aSI6IjYwQzE3NTZBRkU4REFDQTY4M0Y0QzVDNkU4RDMwRkE3IiwiaWF0IjoxNjA2OTg4MjA1LCJzY29wZSI6WyJXb3JrZmxvd0FwaSJdfQ.auuTeD3hEBl40ZEXK58oSIGyHihuTMTxsFf_qAOeScsw4bcYz7YFVNWQqUPgx7Cno541wKMz70oOwO01M2Es31u9lN87y-jCJCn721vbGQeOXqXAlqztGUB5cJiTerOgVK_Fp4IMpm7TFQdzDKN42k3TPIX4IjOVBnc3bINXCtDnr5iteaLYcvwYI1vU-WyYqjfW4KCcEqwCjUA3F6eUYVMuXIsejD6DTI-7hwLqTP1Hopdtmq5x6W38kBcg1I-LrqPhLpg2-tj0xE7CcqttDWSC0G3wEjO04rflDkA0R58iDOgIuMhcPPZGaT8pAwhA5E0pkEjvIHKBV0aaeJ9pug
Content-Length: 37
{
"schemeCode" : "TestScheme"
}
If you are using .NET Application when calling the workflow API methods, you can read this instruction.