Create a Private Location
API Explorer: /private-locations
The steps for creating a private location are as follows:
- Create the private-locations object with the Create a Private Location API.
- Capture the
harborId
returned asid
from the response. - Add agent(s) to the private location by using the
harborId
, which is explained in the Create an Agent section. - Capture the
shipId
returned asid
from the response. - Generate the
docker run
command using theshipId
, which is explained in Generate Docker Command section. - Go to step 5 of the Agent installation article and follow the reamining steps to complete the agent installation.
id
for later use. The harborId
will be used as a parameter to identify the private location. The location id
for private locations is harbor-{harborId}
Create a Private Location
curl 'https://a.blazemeter.com/api/v4/private-locations' \
-X POST \
-H 'Content-Type: application/json' \
--user 'api_key_id:api_key_secret' \
-d '{"consoleXms":1024,"consoleXmx":4096,"engineXms":1024,"engineXmx":4096,"name":"My Private Location","slots":1,"threadsPerEngine":1000,"type":"large","overrideCPU":2,"overrideMemory":4096,"accountId":123456,"workspacesId":[123456]}'
Create a Dedicated Private Location Request Attributes
Attributes
-
consoleXms
integerThe minimum memory usage for JVM Arguments. Must match
engineXms
-
consoleXmx
integerThe maximum memory usage for JVM Arguments. Must match
engineXmx
-
engineXms
integerThe minimum memory usage for JVM Arguments. Must match
consoleXms
-
engineXmx
integerThe maximum memory usage for JVM Arguments. Must match
consoleXmx
-
funcIds
arrayrequired
The list of functionalities that this private location will use. For Dedicated ("large") type, ONLY ONE functionality can be used, while the Shared ("small") can have one or more functionalities. Visit this link for full list of functionalities
-
name
stringrequired
The name of the private location
-
slots
integerThis controls the number of "engines" that can run in one agent. If
type
is "large", this must be1
. Iftype
is "small", this can vary -
threadsPerEngine
integerrequired
The maximum number of threads per instance you can run with. The max value is plan dependent or 1000 threads, whichever is the smallest
-
type
stringrequired
The type of private location to create (only accepts "large" or "small"). The "large" version refers to the Dedicated engine, while the "small" version refers to a Shared engine, as explained in this article
-
overrideCPU
integerSets the number of CPU(s) the agent will spin an instance up with
-
overrideMemory
integerSets the amount of memory the agent will spin an instance up with
-
accountId
integerrequired
The
accountId
of your account -
workspacesId
arrayrequired
Can contain a list of
workspaceId
s from the same account
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 a Private LocationCreate a Dedicated Private Location POST Body (JSON)
{
"consoleXms": 1024,
"consoleXmx": 4096,
"engineXms": 1024,
"engineXmx": 4096,
"funcIds":["performance"],
"name": "My Private Location",
"slots": 1,
"threadsPerEngine": 1000,
"type": "large",
"overrideCPU": 2,
"overrideMemory": 4096,
"accountId": 123456,
"workspacesId": [
123456
]
}
Create a Dedicated Private Location Response Attributes
To see a breakdown of the attributes, refer to The Private Location Object section.
Response (Dedicated)201 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",
"funcIds": [
"performance"
],
"hidden": false,
"overrideCPU": 2,
"overrideMemory": 4096,
"created": 1561739682,
"updated": 1561739682,
"accountId": 123456,
"workspacesId": [
123456
],
"ships": []
},
"request_id": "5d1641a1c3fd1"
}
Create a Shared Private Location Request Attributes
Attributes
-
consoleXms
integerThe minimum memory usage for JVM Arguments. Must match
engineXms
-
consoleXmx
integerThe maximum memory usage for JVM Arguments. Must match
engineXmx
-
engineXms
integerThe minimum memory usage for JVM Arguments. Must match
consoleXms
-
engineXmx
integerThe maximum memory usage for JVM Arguments. Must match
consoleXmx
-
funcIds
arrayrequired
The list of functionalities that this private location will use. For Dedicated ("large") type, ONLY ONE functionality can be used, while the Shared ("small") can have one or more functionalities. Visit this link for full list of functionalities
-
name
stringrequired
The name of the private location
-
slots
integerThis controls the number of "engines" that can run in one agent. If
type
is "large", this must be 1. Iftype
is "small", this can vary -
threadsPerEngine
integerrequired
The maximum number of threads per instance you can run with. The max value is plan dependent or 1000 threads, whichever is the smallest
-
type
stringrequired
The type of private location to create (only accepts "large" or "small"). The "large" version refers to the Dedicated engine, while the "small" version refers to a Shared engine, as explained in this article
-
overrideCPU
integerSets the number of CPU(s) the agent will spin an instance up with
-
overrideMemory
integerSets the amount of memory the agent will spin an instance up with
-
accountId
integerrequired
The
accountId
of your account -
workspacesId
arrayrequired
Can contain a list of
workspaceId
s from the same account
Create a Private LocationCreate a Shared Private Location POST Body (JSON)
{
"consoleXms": 1024,
"consoleXmx": 4096,
"engineXms": 1024,
"engineXmx": 4096,
"name": "My Private Location",
"slots": 5,
"threadsPerEngine": 1000,
"type": "small",
"funcIds":["performance","functionalApi","proxyRecorder"],
"overrideCPU": 1,
"overrideMemory": 4096,
"accountId": 123456,
"workspacesId": [
123456
]
}
Create a Shared Private Location Response Attributes
To see a breakdown of the attributes, refer to The Private Location Object section.
Response (Shared)201 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": 5,
"type": "large",
"funcIds": [
"performance",
"functionalApi",
"proxyRecorder"
],
"hidden": false,
"overrideCPU": 1,
"overrideMemory": 4096,
"created": 1561739682,
"updated": 1561739682,
"accountId": 123456,
"workspacesId": [
123456
],
"ships": []
},
"request_id": "5d1641a1c3fd1"
}