Preview
The next times a repeat would fire, for a repeat that has not been saved yet
curl --request POST \
--url http://localhost:44442/api/v1/schedule/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"starts_at": "<string>",
"every": "1d",
"days": [],
"monthday": 0,
"nth": 0,
"until": "<string>",
"count": 5
}
'import requests
url = "http://localhost:44442/api/v1/schedule/preview"
payload = {
"starts_at": "<string>",
"every": "1d",
"days": [],
"monthday": 0,
"nth": 0,
"until": "<string>",
"count": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
starts_at: '<string>',
every: '1d',
days: [],
monthday: 0,
nth: 0,
until: '<string>',
count: 5
})
};
fetch('http://localhost:44442/api/v1/schedule/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "44442",
CURLOPT_URL => "http://localhost:44442/api/v1/schedule/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'starts_at' => '<string>',
'every' => '1d',
'days' => [
],
'monthday' => 0,
'nth' => 0,
'until' => '<string>',
'count' => 5
]),
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 := "http://localhost:44442/api/v1/schedule/preview"
payload := strings.NewReader("{\n \"starts_at\": \"<string>\",\n \"every\": \"1d\",\n \"days\": [],\n \"monthday\": 0,\n \"nth\": 0,\n \"until\": \"<string>\",\n \"count\": 5\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:44442/api/v1/schedule/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"starts_at\": \"<string>\",\n \"every\": \"1d\",\n \"days\": [],\n \"monthday\": 0,\n \"nth\": 0,\n \"until\": \"<string>\",\n \"count\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:44442/api/v1/schedule/preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"starts_at\": \"<string>\",\n \"every\": \"1d\",\n \"days\": [],\n \"monthday\": 0,\n \"nth\": 0,\n \"until\": \"<string>\",\n \"count\": 5\n}"
response = http.request(request)
puts response.read_body{
"occurrences": [
"<string>"
],
"rule": "<string>"
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}Authorizations
An API key from Settings, API Keys. A caller on this machine needs none.
Body
ISO 8601; defaults to now
1How often it repeats: 15m, 1h, 1d, 2w, 1 month. Null fires once. With no starts_at this is dateless. The anchor is snapped to the unit, so 1h means the top of every hour.
32"1d"
Weekdays it may fall on, narrowing the cadence. Weekdays-only is ["mo","tu","we","th","fr"]
mo, tu, we, th, fr, sa, su Day of the month, or -1 for its last day. The one thing starts_at cannot say, since months differ in length
-31 <= x <= 31Which match to keep. With days ["fr"] and a monthly cadence, -1 is the last Friday of the month
-53 <= x <= 53Stop repeating after this date. Null repeats forever. Not ends_at: this is when the event stops recurring at all.
1 <= x <= 100Was this page helpful?
curl --request POST \
--url http://localhost:44442/api/v1/schedule/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"starts_at": "<string>",
"every": "1d",
"days": [],
"monthday": 0,
"nth": 0,
"until": "<string>",
"count": 5
}
'import requests
url = "http://localhost:44442/api/v1/schedule/preview"
payload = {
"starts_at": "<string>",
"every": "1d",
"days": [],
"monthday": 0,
"nth": 0,
"until": "<string>",
"count": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
starts_at: '<string>',
every: '1d',
days: [],
monthday: 0,
nth: 0,
until: '<string>',
count: 5
})
};
fetch('http://localhost:44442/api/v1/schedule/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "44442",
CURLOPT_URL => "http://localhost:44442/api/v1/schedule/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'starts_at' => '<string>',
'every' => '1d',
'days' => [
],
'monthday' => 0,
'nth' => 0,
'until' => '<string>',
'count' => 5
]),
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 := "http://localhost:44442/api/v1/schedule/preview"
payload := strings.NewReader("{\n \"starts_at\": \"<string>\",\n \"every\": \"1d\",\n \"days\": [],\n \"monthday\": 0,\n \"nth\": 0,\n \"until\": \"<string>\",\n \"count\": 5\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:44442/api/v1/schedule/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"starts_at\": \"<string>\",\n \"every\": \"1d\",\n \"days\": [],\n \"monthday\": 0,\n \"nth\": 0,\n \"until\": \"<string>\",\n \"count\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:44442/api/v1/schedule/preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"starts_at\": \"<string>\",\n \"every\": \"1d\",\n \"days\": [],\n \"monthday\": 0,\n \"nth\": 0,\n \"until\": \"<string>\",\n \"count\": 5\n}"
response = http.request(request)
puts response.read_body{
"occurrences": [
"<string>"
],
"rule": "<string>"
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}