API allows you to remotely control Kraken Stress Testing Toolkit, as well as get information (statistics) on the current work.
Contents
API connection port
The default is 6015/HTTP, can be changed in the interface.
After the change, you need to reconnect the API
API Authorization
header is used for authorization: X-API-KEY
The API accepts the X-API-KEY header as a GET parameter or as a custom header.
Example:
http://127.0.0.1:6015/play/CCD142CE-0AB5-4492-A9F7-762019803C96?X-API-KEY=15A692A4-DDEC-4DE4-8DE9-2131062CF36B
API Response Codes
Code | Description |
200 | Available |
201 | Task started |
400 | Error in request |
401 | Authorization required |
404 | Task item not found |
405 | Method not supported |
423 | The target resource from the request is blocked from having the specified method applied to it |
500 | Server error |
503 | The command is not available |
API Commands
Obtaining current statistics of the message flow
The Method allows you to get current statistics on the event stream.
- Messages - the current state of sending events.
- true - Active
- false - Stopped
- EPS - current number of events per second.
- AVG - Average number of events sent per second.
- Sending - The number of events sent since startup.
- Time - Time since startup, in seconds.
Request
[GET] http://127.0.0.1:6015/v2/statistics
Example answer
{
"Messages": true
"EPS": 19075,
"AVG": 27032.0,
"Sending": 162192,
"Time": 6
}