Follow

Schedule a Test

Description

This BlazeMeter API enables you to schedule any available test or multi-test in advance. This API call includes parameters to identify the user, Test/Multi-test and the scheduling configuration on Cron format. Also, when entering the scheduled time of your Test, this will be set in UTC / GMT timezone. 

URL

https://a.blazemeter.com/api/v4/schedules

Request Headers

Parameter Description
x-api-key Identifies the user ( --user 'id:secret' ). How to get the API Key?
Content-Type application/json

Request Parameters

Parameter Description
cron Cron syntax execution line
note Add comments - Optional
testId / collectionId Identifies the test. How to get the Test ID?


cURL

curl -X POST https://a.blazemeter.com/api/v4/schedules -H "Content-Type: application/json" -d '{"cron":"* * 2 3 *", "testId": 1328776}' --user 'id:secret'

Python

import requests

payload = "{\n        \"cron\": \"* * 2 3 *\",\n        \"testId\": 1328776\n}"
def scheduleTest():
return requests.post(
'https://a.blazemeter.com/api/v4/schedules', data=payload, auth=('id','secret'))
res = scheduleTest() 
print res.json()

Example Response

{
  "api_version": 4,
  "error": null,
  "result": {
    "id": "aab6ca2bb2j645132c367b23e5",
    "cron": "* * 2 3 *",
    "nextRun": 1488412800,
    "enabled": true,
    "type": "testRun",
    "created": 1488374315,
    "updated": 1488374315,
    "testId": 1328776,
    "createdById": 2483174
  }
}



Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.