Add a Workspace to Private Location
API Explorer: /private-locations/{harborId}/add-workspace
To create a workspace to your private location, you will need to know the harborId
and the workspaceId
. The sample code adds workspaceId
of 234567
to a private location with a harborId
of 5d1641a21726d36d4632fd34
(the 5d1641a21726d36d4632fd34
is contained in the URL). To use this API, replace the harborId
of 5d1641a21726d36d4632fd34
with your harborId
and give the workspaceId
of a workspace you want to add.
Caution: Make sure that you have not already added the workspaceId
to the private location using the Private Location Detail, otherwise you will get a 400 error code response.
Add a Workspace to Private Location
curl 'https://a.blazemeter.com/api/v4/private-locations/5d1641a21726d36d4632fd34/add-workspace' \
-X POST \
-H 'Content-Type: application/json' \
--user 'api_key_id:api_key_secret' \
-d '{"workspaceId": 234567}'
Add a Workspace to Private Location Request Attributes
The following parameters are the parameters used to create a private location
Attributes
-
workspaceId
integerrequired
The
workspaceId
of the workspace to be added
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.
Add a Workspace to Private LocationAdd a Workspace to Private Location POST Body (JSON)
{
"workspaceId": 234567
}
Add a Workspace to Private Location Response Attributes
To see a breakdown of the attributes, refer to The Private Location Object section.
Response201 Created
{
"api_version": 4,
"error": null,
"result": {
"id": "5d1641a21726d36d4632fd34",
"name": "My Private Location",
"userId": 123456,
"consoleXms": 1024,
"consoleXmx": 4096,
"engineXms": 1024,
"engineXmx": 4096,
"threadsPerEngine": 1000,
"slots": 1,
"type": "large",
"hidden": false,
"created": 1562854534,
"updated": 1562854573,
"accountId": 123456,
"shipsId": [
{
"$oid": "5d2657219583d81adc3778b4"
}
],
"workspacesId": [
123456,
234567
],
"ships": [
{
"id": "5d2657219583d81adc3778b4",
"name": "My Agent",
"address": "123.12.12.123",
"state": "empty",
"hasJetlag": false,
"created": 1561739682,
"updated": 1562854544,
"ts": null
}
]
},
"request_id": "5d2744ad525c5"
}