curl --request POST \
--url https://api.olostep.com/v1/schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "<string>",
"payload": {},
"cron_expression": "<string>",
"execute_at": "2023-11-07T05:31:56Z",
"expression_timezone": "<string>",
"text": "<string>"
}
'import requests
url = "https://api.olostep.com/v1/schedules"
payload = {
"endpoint": "<string>",
"payload": {},
"cron_expression": "<string>",
"execute_at": "2023-11-07T05:31:56Z",
"expression_timezone": "<string>",
"text": "<string>"
}
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({
endpoint: '<string>',
payload: {},
cron_expression: '<string>',
execute_at: '2023-11-07T05:31:56Z',
expression_timezone: '<string>',
text: '<string>'
})
};
fetch('https://api.olostep.com/v1/schedules', 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://api.olostep.com/v1/schedules",
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([
'endpoint' => '<string>',
'payload' => [
],
'cron_expression' => '<string>',
'execute_at' => '2023-11-07T05:31:56Z',
'expression_timezone' => '<string>',
'text' => '<string>'
]),
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://api.olostep.com/v1/schedules"
payload := strings.NewReader("{\n \"endpoint\": \"<string>\",\n \"payload\": {},\n \"cron_expression\": \"<string>\",\n \"execute_at\": \"2023-11-07T05:31:56Z\",\n \"expression_timezone\": \"<string>\",\n \"text\": \"<string>\"\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("https://api.olostep.com/v1/schedules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endpoint\": \"<string>\",\n \"payload\": {},\n \"cron_expression\": \"<string>\",\n \"execute_at\": \"2023-11-07T05:31:56Z\",\n \"expression_timezone\": \"<string>\",\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olostep.com/v1/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoint\": \"<string>\",\n \"payload\": {},\n \"cron_expression\": \"<string>\",\n \"execute_at\": \"2023-11-07T05:31:56Z\",\n \"expression_timezone\": \"<string>\",\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "recurring",
"method": "GET",
"endpoint": "<string>",
"cron_expression": "<string>",
"execute_at": "2023-11-07T05:31:56Z",
"expression_timezone": "<string>",
"created": "2023-11-07T05:31:56Z"
}Create Schedule
Creates a new schedule to execute API calls at specified times. Supports both one-time executions and recurring schedules using cron expressions. You can also use natural language text to generate cron expressions automatically.
curl --request POST \
--url https://api.olostep.com/v1/schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "<string>",
"payload": {},
"cron_expression": "<string>",
"execute_at": "2023-11-07T05:31:56Z",
"expression_timezone": "<string>",
"text": "<string>"
}
'import requests
url = "https://api.olostep.com/v1/schedules"
payload = {
"endpoint": "<string>",
"payload": {},
"cron_expression": "<string>",
"execute_at": "2023-11-07T05:31:56Z",
"expression_timezone": "<string>",
"text": "<string>"
}
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({
endpoint: '<string>',
payload: {},
cron_expression: '<string>',
execute_at: '2023-11-07T05:31:56Z',
expression_timezone: '<string>',
text: '<string>'
})
};
fetch('https://api.olostep.com/v1/schedules', 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://api.olostep.com/v1/schedules",
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([
'endpoint' => '<string>',
'payload' => [
],
'cron_expression' => '<string>',
'execute_at' => '2023-11-07T05:31:56Z',
'expression_timezone' => '<string>',
'text' => '<string>'
]),
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://api.olostep.com/v1/schedules"
payload := strings.NewReader("{\n \"endpoint\": \"<string>\",\n \"payload\": {},\n \"cron_expression\": \"<string>\",\n \"execute_at\": \"2023-11-07T05:31:56Z\",\n \"expression_timezone\": \"<string>\",\n \"text\": \"<string>\"\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("https://api.olostep.com/v1/schedules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endpoint\": \"<string>\",\n \"payload\": {},\n \"cron_expression\": \"<string>\",\n \"execute_at\": \"2023-11-07T05:31:56Z\",\n \"expression_timezone\": \"<string>\",\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olostep.com/v1/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoint\": \"<string>\",\n \"payload\": {},\n \"cron_expression\": \"<string>\",\n \"execute_at\": \"2023-11-07T05:31:56Z\",\n \"expression_timezone\": \"<string>\",\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "recurring",
"method": "GET",
"endpoint": "<string>",
"cron_expression": "<string>",
"execute_at": "2023-11-07T05:31:56Z",
"expression_timezone": "<string>",
"created": "2023-11-07T05:31:56Z"
}Authorizations
Body
The endpoint URL to call when the schedule executes. For POST requests with Olostep endpoints, you can use short form (e.g., 'v1/scrapes', 'v1/batches', 'v1/crawls', 'v1/maps', 'v1/answers') which will be automatically prefixed with 'https://api.olostep.com/'. For other endpoints, provide the full URL.
Natural language text to automatically generate a cron expression. The system will convert your text into a valid cron expression. Examples: 'every 3 minutes', 'every day at 10am', 'every Monday at 9am'. Mutually exclusive with cron_expression and execute_at. When used, expression_timezone defaults to 'UTC'.
Response
Schedule created successfully.
Was this page helpful?