Create a Private Location

API Explorer: /private-locations

The steps for creating a private location are as follows:

  1. Create the private-locations object with the Create a Private Location API.
  2. Capture the harborId returned as id from the response.
  3. Add agent(s) to the private location by using the harborId, which is explained in the Create an Agent section.
  4. Capture the shipId returned as id from the response.
  5. Generate the docker run command using the shipId, which is explained in Generate Docker Command section.
  6. Go to step 5 of the Agent installation article and follow the reamining steps to complete the agent installation.
Once created, a private location can be used as a location to run your tests in, so make sure to save the 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

  • consoleXmsinteger

    The minimum memory usage for JVM Arguments. Must match engineXms

  • consoleXmxinteger

    The maximum memory usage for JVM Arguments. Must match engineXmx

  • engineXmsinteger

    The minimum memory usage for JVM Arguments. Must match consoleXms

  • engineXmxinteger

    The maximum memory usage for JVM Arguments. Must match consoleXmx

  • funcIdsarray

    required

    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

  • namestring

    required

    The name of the private location

  • slotsinteger

    This controls the number of "engines" that can run in one agent. If type is "large", this must be 1. If type is "small", this can vary

  • threadsPerEngineinteger

    required

    The maximum number of threads per instance you can run with. The max value is plan dependent or 1000 threads, whichever is the smallest

  • typestring

    required

    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

  • overrideCPUinteger

    Sets the number of CPU(s) the agent will spin an instance up with

  • overrideMemoryinteger

    Sets the amount of memory the agent will spin an instance up with

  • accountIdinteger

    required

    The accountId of your account

  • workspacesIdarray

    required

    Can contain a list of workspaceIds 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

  • consoleXmsinteger

    The minimum memory usage for JVM Arguments. Must match engineXms

  • consoleXmxinteger

    The maximum memory usage for JVM Arguments. Must match engineXmx

  • engineXmsinteger

    The minimum memory usage for JVM Arguments. Must match consoleXms

  • engineXmxinteger

    The maximum memory usage for JVM Arguments. Must match consoleXmx

  • funcIdsarray

    required

    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

Starting February 2022, the API Functional testing feature has been deprecated. Depending on your subscription plan, you may still be able to run existing tests but can no longer create new ones. Please use BlazeMeter API Monitoring to create and run your API Functional Tests going forward.
  • namestring

    required

    The name of the private location

  • slotsinteger

    This controls the number of "engines" that can run in one agent. If type is "large", this must be 1. If type is "small", this can vary

  • threadsPerEngineinteger

    required

    The maximum number of threads per instance you can run with. The max value is plan dependent or 1000 threads, whichever is the smallest

  • typestring

    required

    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

  • overrideCPUinteger

    Sets the number of CPU(s) the agent will spin an instance up with

  • overrideMemoryinteger

    Sets the amount of memory the agent will spin an instance up with

  • accountIdinteger

    required

    The accountId of your account

  • workspacesIdarray

    required

    Can contain a list of workspaceIds 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"
}