Update Tags

To update which tags are assigned to a test, you need to know the testId (in this example, 1234567), the tagId of the tag that you want to add (in this example 888), and the current tagIDs of the test, in this example 1234.

Use the actual ID value of your tag and test: Use the Get All Tags API to see the list of tagIDs to identify the ID of the tag you want to add. Next, use the List Tests API to find your testId. Finally, use Test Details API to see the current tag list of the test, and add the new ID to the list. Provide the full array of desired tags, not just the ones that you want to add.

Minimum Parameters for Updating Tags

The following parameters are the base parameters required to update a tag.

Update a Tag Request Attributes

Attributes

  • description string

    required

    The description of the tag

  • id integer

    required

    The identifier of the tag

  • name string

    The name of the tag

Update TagsMinimum Configuration Sample

curl 'https://a.blazemeter.com/api/v4/tests/1234567' \
   -X PATCH \
   -H 'accept: */*' \
   -H 'Content-Type: application/json' \
   -d '{"tags":[1234, 888]}'

Response201 Created

{
  "api_version": 4,
  "error": null,
  "result": {
    "id": 1234567,
    "isNewTest": true,
    "name": "July_13_12:55 PM",
    "userId": 352756,
    "creatorClientId": "gui",
    "overrideExecutions": [ ],
    "executions": [ ],
    "hasThreadGroupsToOverride": false,
    "hasNonRegularThreadGroup": false,
    "shouldSendReportEmail": true,
    "dependencies": [],
    "tags": [
      {
        "id": 1234,
        "label": "demo"
      },
      {
        "id": 888,
        "label": "Dummy"
      }
    ],
    "shouldRemoveJmeter": true,
    "created": 1657731344,
    "updated": 1658944762,
    "projectId": 494347,
    "lastUpdatedById": 1609533,
    "configuration": {
      "type": "taurus",
      "dedicatedIpsEnabled": false,
      "canControlRampup": false,
      "targetThreads": 500,
      "executionType": "taurusCloud",
      "enableFailureCriteria": false,
      "enableMockServices": false,
      "enableLoadConfiguration": true,
      "scriptType": "jmeter",
      "threads": 500,
      "filename": "dummy_errors.jmx",
      "testMode": "script",
      "extraSlots": 0,
      "plugins": {
        "jmeter": {
          "version": "auto",
          "consoleArgs": "",
          "enginesArgs": ""
        },
        "thresholds": {
          "thresholds": [],
          "ignoreRampup": false,
          "fromTaurus": false,
          "slidingWindow": false
        }
      }
    },
    "subscribers": [
      352756
    ]
  },
  "request_id": "62e17cfa53674",
  "test": {
    "id": 11268687,
    "isNewTest": true,
    "name": "July_13_12:55 PM",
    "userId": 352756,
    "creatorClientId": "gui",
    "overrideExecutions": [ ],
    "executions": [ ],
    "hasThreadGroupsToOverride": false,
    "hasNonRegularThreadGroup": false,
    "shouldSendReportEmail": true,
    "dependencies": [],
    "tags": [
      {
        "id": 1234,
        "label": "demo"
      },
      {
        "id": 888,
        "label": "Dummy"
      }
    ],
    "shouldRemoveJmeter": true,
    "created": 1657731344,
    "updated": 1658944762,
    "projectId": 494347,
    "lastUpdatedById": 1609533,
    "configuration": {
      "type": "taurus",
      "dedicatedIpsEnabled": false,
      "canControlRampup": false,
      "targetThreads": 500,
      "executionType": "taurusCloud",
      "enableFailureCriteria": false,
      "enableMockServices": false,
      "enableLoadConfiguration": true,
      "scriptType": "jmeter",
      "threads": 500,
      "filename": "dummy_errors.jmx",
      "testMode": "script",
      "extraSlots": 0,
      "plugins": {
        "jmeter": {
          "version": "auto",
          "consoleArgs": "",
          "enginesArgs": ""
        },
        "thresholds": {
          "thresholds": [],
          "ignoreRampup": false,
          "fromTaurus": false,
          "slidingWindow": false
        }
      }
    },
    "subscribers": [
      352756
    ]
  }
}