Create an Agent
API Explorer: /private-locations/(harborId)/servers
To create an agent, POST the provided configuration (you will need to know the harborId
). The sample code adds an agent to a private location with a harborId
of 5d1641a21726d36d4632fd34
(the 5d1641a21726d36d4632fd34
is contained in the URL) with a new agent name My Agent
and using an IP of 123.12.12.123
in the address
attribute. To use this API, replace the harborId
of 5d1641a21726d36d4632fd34
with your harborId
and give the name
attribute a name of your choosing and, optionally, the IP of your machine.
shipId
from the response (found in the id
attribute) for use in the next step of the private location creation process.Create an Agent
curl 'https://a.blazemeter.com/api/v4/private-locations/5d1641a21726d36d4632fd34/servers' \
-X POST \
-H 'Content-Type: application/json' \
--user 'api_key_id:api_key_secret' \
-d '{"name":"My Agent","address":"123.12.12.123"}'
Create an Agent Request Attributes
Attributes
-
name
stringrequired
The name of the agent
-
address
stringThe IP address of the agent
The following JSON sample provides a more readable version of the content contained in the above curl
example. This example represents the attributes and values contained in the -d
flag of the curl
example.
Create an AgentCreate an Agent POST Body (JSON)
{
"name": "My Agent",
"address": "123.12.12.123"
}
Create an Agent Response Attributes
To see a breakdown of the attributes, please see The Server Object section.
Response201 Created
{
"api_version": 4,
"error": null,
"result": {
"id": "5d2657219583d81adc3778b4",
"name": "My Agent",
"address": "123.12.12.123",
"state": "empty",
"hasJetlag": false,
"created": 1562793761,
"updated": 1562793761,
"ts": null
},
"request_id": "5d265720cf008"
}