Update an Agent

API Explorer: /private-locations/{harborId}/servers/{shipId}

To update an agent, you will need to know the harborId and the shipId. The sample code adds an agent to a private location with a harborId of 5b0323b3c648be3b4c7b23c8 and an agent with the shipId of 5d2657219583d81adc3778b4 with a new agent name My Agent. To use this API, replace the harborId of 5b0323b3c648be3b4c7b23c8 with your harborId, replace the shipId of 5d2657219583d81adc3778b4 with your shipId and give the name attribute a name of your choosing and, optionally, the IP of your machine.

If you do not know the harborId of the private location, use List Private Locations to return a list of your created private locations. If you do not know the shipId of the agent, use List Agents to return a list of your created agents.

Update an Agent

curl 'https://a.blazemeter.com/api/v4/private-locations/5b0323b3c648be3b4c7b23c8/servers/5d2657219583d81adc3778b4' \
	-X PATCH \
	-H 'Content-Type: application/json' \
	--user 'api_key_id:api_key_secret' \
	-d '{"name":"My New Agent"}'

Update an Agent Request Attributes

Attributes

  • namestring

    The name 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.

Update an AgentUpdate an Agent PATCH Body (JSON)

{
  "name": "My New Agent"
}

Update an Agent Response Attributes

To see a breakdown of the attributes, refer to The Server Object section.

Response201 Created

{
    "api_version": 4,
    "error": null,
    "result": {
        "id": "5d2657219583d81adc3778b4",
        "name": "My New Agent",
        "address": "123.12.12.123",
        "state": "empty",
        "hasJetlag": false,
        "created": 1562793761,
        "updated": 1562793761,
        "ts": null
    },
    "request_id": "5d265720cf008"
}