curl --request PUT \
--url https://tester.army/api/v1/groups/{groupId}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"minute": 0,
"hour": 11,
"dayOfWeek": 3,
"cronExpression": "<string>",
"timezone": "UTC",
"name": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://tester.army/api/v1/groups/{groupId}/schedule"
payload = {
"minute": 0,
"hour": 11,
"dayOfWeek": 3,
"cronExpression": "<string>",
"timezone": "UTC",
"name": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
minute: 0,
hour: 11,
dayOfWeek: 3,
cronExpression: '<string>',
timezone: 'UTC',
name: '<string>',
projectEnvironmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://tester.army/api/v1/groups/{groupId}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tester.army/api/v1/groups/{groupId}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'minute' => 0,
'hour' => 11,
'dayOfWeek' => 3,
'cronExpression' => '<string>',
'timezone' => 'UTC',
'name' => '<string>',
'projectEnvironmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tester.army/api/v1/groups/{groupId}/schedule"
payload := strings.NewReader("{\n \"minute\": 0,\n \"hour\": 11,\n \"dayOfWeek\": 3,\n \"cronExpression\": \"<string>\",\n \"timezone\": \"UTC\",\n \"name\": \"<string>\",\n \"projectEnvironmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://tester.army/api/v1/groups/{groupId}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"minute\": 0,\n \"hour\": 11,\n \"dayOfWeek\": 3,\n \"cronExpression\": \"<string>\",\n \"timezone\": \"UTC\",\n \"name\": \"<string>\",\n \"projectEnvironmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tester.army/api/v1/groups/{groupId}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"minute\": 0,\n \"hour\": 11,\n \"dayOfWeek\": 3,\n \"cronExpression\": \"<string>\",\n \"timezone\": \"UTC\",\n \"name\": \"<string>\",\n \"projectEnvironmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"schedule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"frequency": "every_1h",
"minute": 29,
"hour": 11,
"dayOfWeek": 3,
"timezone": "<string>",
"cronExpression": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"schedule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"frequency": "every_1h",
"minute": 29,
"hour": 11,
"dayOfWeek": 3,
"timezone": "<string>",
"cronExpression": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Create or replace a group's schedule
Create the group’s recurring schedule, or replace the existing one in place. Every time the schedule fires, a run of each enabled test in the group is queued. The scheduler entry is updated before the stored schedule, so a rejected cron leaves the current schedule running. Returns 201 when the group had no schedule and 200 when one was replaced. Web projects only: a mobile project’s group returns 400.
curl --request PUT \
--url https://tester.army/api/v1/groups/{groupId}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"minute": 0,
"hour": 11,
"dayOfWeek": 3,
"cronExpression": "<string>",
"timezone": "UTC",
"name": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://tester.army/api/v1/groups/{groupId}/schedule"
payload = {
"minute": 0,
"hour": 11,
"dayOfWeek": 3,
"cronExpression": "<string>",
"timezone": "UTC",
"name": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
minute: 0,
hour: 11,
dayOfWeek: 3,
cronExpression: '<string>',
timezone: 'UTC',
name: '<string>',
projectEnvironmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://tester.army/api/v1/groups/{groupId}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tester.army/api/v1/groups/{groupId}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'minute' => 0,
'hour' => 11,
'dayOfWeek' => 3,
'cronExpression' => '<string>',
'timezone' => 'UTC',
'name' => '<string>',
'projectEnvironmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tester.army/api/v1/groups/{groupId}/schedule"
payload := strings.NewReader("{\n \"minute\": 0,\n \"hour\": 11,\n \"dayOfWeek\": 3,\n \"cronExpression\": \"<string>\",\n \"timezone\": \"UTC\",\n \"name\": \"<string>\",\n \"projectEnvironmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://tester.army/api/v1/groups/{groupId}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"minute\": 0,\n \"hour\": 11,\n \"dayOfWeek\": 3,\n \"cronExpression\": \"<string>\",\n \"timezone\": \"UTC\",\n \"name\": \"<string>\",\n \"projectEnvironmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tester.army/api/v1/groups/{groupId}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"minute\": 0,\n \"hour\": 11,\n \"dayOfWeek\": 3,\n \"cronExpression\": \"<string>\",\n \"timezone\": \"UTC\",\n \"name\": \"<string>\",\n \"projectEnvironmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"schedule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"frequency": "every_1h",
"minute": 29,
"hour": 11,
"dayOfWeek": 3,
"timezone": "<string>",
"cronExpression": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"schedule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"frequency": "every_1h",
"minute": 29,
"hour": 11,
"dayOfWeek": 3,
"timezone": "<string>",
"cronExpression": "<string>",
"projectEnvironmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key authentication using Bearer token format. The CLI's ta auth access tokens are also accepted; because they name a user rather than a workspace, a user in several workspaces selects one with the x-testerarmy-team header (workspace id or slug).
Path Parameters
Test group ID
Body
Preset cadence. The interval presets take minute; daily adds hour; weekly adds hour and dayOfWeek; custom takes cronExpression.
every_1h, every_3h, every_6h, every_12h, daily, weekly, custom Minute of the hour (0-59). Defaults to 0. Ignored for custom.
0 <= x <= 59Hour of the day (0-23) in timezone. Required for daily and weekly.
0 <= x <= 230 = Sunday through 6 = Saturday. Required for weekly.
0 <= x <= 6Standard 5-field cron (minute hour day-of-month month day-of-week), e.g. "*/30 * * * *" for every 30 minutes. Seconds are not supported. Required for custom.
1 - 100IANA timezone the schedule is evaluated in, e.g. "Europe/Warsaw". Defaults to UTC.
1 - 64Display name shown in the dashboard.
1 - 120Saved environment the schedule runs against, from the project's environments. Omit or pass null for Production. PR Preview cannot be scheduled.
Response
Existing schedule replaced
Show child attributes
Show child attributes