API

API connection port

The default default of 6015/TCP 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

Playbooks

Command Parameters Additional parameters Description
play Playbook ID Launch Playbook by ID
[GET] http://127.0.0.1:6015/play/CCD142CE-0AB5-4492-A9F7-762019803C96
playbook list Returns a list of playbooks, in the format name=id

[GET] http://127.0.0.1:6015/playbook/list

Status check

Command Parameters Additional parameters Description
state live Check API availability.

[GET] http://127.0.0.1:6015/state/live

Sending events (messages)

Command Parameters Additional parameters Description
messages start EPS - set the EPS value for the sending task.

stoptime - Set the execution time of the sending task.

StopCount - Set the number of events to be sent, before stopping.

Start sending events with the current profile.

[GET] http://127.0.0.1:6015/messages/start

[GET] http://127.0.0.1:6015/messages/start?EPS=1000&stoptime=3600

[GET] http://127.0.0.1:6015/messages/start?EPS=1000

[GET] http://127.0.0.1:6015/messages/start?EPS=1000&stoptime=360&StopCount=100000

messages stop Stop sending events

[GET] http://127.0.0.1:6015/messages/stop

messages eps Return current EPS

[GET] http://127.0.0.1:6015/messages/eps

messages avg Return the current average EPS

[GET] http://127.0.0.1:6015/messages/avg

messages state Return the sending status (Active/Inactive)

[GET] http://127.0.0.1:6015/messages/state

messages time Get run (send) time in seconds

[GET] http://127.0.0.1:6015/messages/time

messages sent Get the number of events sent

[GET] http://127.0.0.1:6015/messages/sent

messages set eps - set the EPS value for the sending task.
stoptime - Set the execution time of the sending task.
stopcount - Set the number of events to be sent before stopping.
timeout - Set timeout between sending events
randomtimeout - use random timeout (true/false)
Allows you to change the parameters for sending events to messages without performing any actions.

[GET] http://127.0.0.1:6015/messages/set?eps=100&stoptime=5&stopcount=1000

[GET] http://127.0.0.1:6015/messages/set?timeou=1&randomtimeou=true

messages clear Completely clears the list of event sending rules in Messages

[GET] http://127.0.0.1:6015/messages/clear

messages disable Disables all sending rules without deleting them

[GET] http://127.0.0.1:6015/messages/disable

messages add proto - specify the sending protocol
port - specify the sending port
host - specify the sending host
template - specify template name
json - enable or disable json format (true/false)
Adds a new rule for sending events

If the template does not exist, the record will not be added

[GET] http://127.0.0.1:6015/messages/add?template=nginx&port=1234&proto=TCP&host=123.123.123.123

Profiles (messages)

Command Parameters Additional parameters Description
profiles save name - profile name (charming field) Save the current messages profile

[GET] http://127.0.0.1:6015/profiles/save?name=test

profiles load name - profile name (charming field) Set messages profile

[GET] http://127.0.0.1:6015/profiles/load?name=test

profiles list Get a list of available profiles
profiles delete name - profile name (charming field) Delete a saved profile

[GET] http://127.0.0.1:6015/profiles/delete?name=test

Sending single events (sender)

Command Parameters Additional parameters Description
sender start message - Message to be sent (Required parameter)
host - Set host
port - Set port
proto - Select protocol (from the list of available protocols)
index - Set Index parameter
json - set the parameter of sending events in json format (true/false)
[GET] http://127.0.0.1:6015/sender?message=<message>&proto=udp&index=test2&json=false

Working with templates

Command Parameters Additional parameters Description
templates list Get a list of available templates

[GET]http://127.0.0.1:6015/templates/list

templates add Required Parameters:
name - template name
message - event to add to the templateNot required parameters:
index - set index in the template
Add event to template

[GET]http://127.0.0.1:6015/templates/add?name=Test&message=1

Version check

Command Parameters Additional parameters Description
version build Return build number
[GET] http://127.0.0.1:6015/vesion/build
version app Get the application version

[GET] http://127.0.0.1:6015/vesion/app

Changing settings

Command Parameters Additional parameters Description
set settings debug = true\false - enable or disable debugging Example
[GET] http://127.0.0.1:6015/set/settings?debug=true

 

Share to friends
en_USEnglish