Validate a File

API Explorer: /tests/{testId}/validate

To validate a JMeter or Taurus YAML file, use POST to run a validation for the given file (you need to know the testId). The sample code validates the file DemoBlaze-Selenium-.yaml in a test with an ID of 1234567 (the 1234567 is contained in the URL).

If you do not know the testId of the test to update, use List Tests to return a list of your created tests.
You will need to use the Check File Validation API to check the status of the validation.

Validate a File

curl 'https://a.blazemeter.com/api/v4/tests/1234567/validate' \
    -X POST \
    -H 'Content-Type: application/json' \
    --user 'api_key_id:api_key_secret' \
    -d '{"files": [{"fileName": "DemoBlaze-Selenium-.yaml"}]}'

Validate a File Request Attributes

Attributes

  • filesarray

    List of files to be validated

Validate a FileValidate a File POST Body (JSON)

{
    "files": [
        {
            "fileName": "DemoBlaze-Selenium-.yaml"
        }
    ]
}

Validate a File Response Attributes

Attributes

  • successboolean

    Denotes if the request got a successful response

  • filesobject

    The file details of the validated file

Response200 OK

{
    "api_version": 4,
    "error": null,
    "result": {
        "success": true,
        "files": {
            "DemoBlaze-Selenium-.yaml": true
        }
    },
    "request_id": "5e0a5729d60c5"
}