Schedule a test plan
POST
/schedule_executions
Base URL
https://app.testsigma.com/api/v1
Create a schedule for a test plan using the REST API.
Authenticate with your API key as a
Bearer token in the
Authorization header. Generate a key →REQUEST BODY
name | The name you want to give to the test schedule. |
executionId | Test plan ID from the GET API. |
scheduleType | How frequently you want to run tests — ONCE, HOURLY, DAILY, WEEKLY, MONTHLY. |
status | Status of the schedule, e.g. ACTIVE. |
nextInterval | Date and time (yyyy-MM-dd'T'HH:mm:ss.SSS) to trigger the test plan. Sample data: 2022-12-14T11:13:00.000 |
timezone | The timezone you want to follow. |
RESPONSE ATTRIBUTES
id | The ID of the schedule. |
executionId | Test plan ID from the GET API. |
name | The name given to the test schedule. |
comments | Comments on the schedule. |
scheduleType | How frequently tests run — ONCE, HOURLY, DAILY, WEEKLY, MONTHLY. |
nextInterval | Epoch timestamp of the next trigger interval. |
nextIntervalUTC | Next trigger interval in UTC. |
createdById | The user ID of the creator. |
createdDate | Date when the schedule was created. |
updatedById | The user ID of the updater. |
updatedDate | Date when the schedule was updated. |
status | Status of the schedule. |
REQUEST
curl -X POST \
'https://app.testsigma.com/api/v1/schedule_executions' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"name": "New Test Plan Schedule",
"executionId": 180,
"scheduleType": "ONCE",
"status": "ACTIVE",
"nextInterval": "2022-12-14T11:13:00.000",
"timezone": "EST"
}'const response = await fetch('https://app.testsigma.com/api/v1/schedule_executions', {
method: 'POST',
headers: {
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "New Test Plan Schedule",
"executionId": 180,
"scheduleType": "ONCE",
"status": "ACTIVE",
"nextInterval": "2022-12-14T11:13:00.000",
"timezone": "EST"
})
});
const data = await response.json();import requests
response = requests.post(
'https://app.testsigma.com/api/v1/schedule_executions',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"name": "New Test Plan Schedule",
"executionId": 180,
"scheduleType": "ONCE",
"status": "ACTIVE",
"nextInterval": "2022-12-14T11:13:00.000",
"timezone": "EST"
}
)
data = response.json()RESPONSE200OK
{
"id": 21,
"executionId": 180,
"name": "New Test Plan Schedule",
"comments": null,
"scheduleType": "WEEKLY",
"nextInterval": 1671016380000,
"nextIntervalUTC": "2022-12-14T11:13:00Z",
"createdById": 10,
"createdDate": 1671006911289,
"updatedById": 10,
"updatedDate": 1671006911289,
"status": "ACTIVE"
}