Pause HTTP schedule
curl --request POST \
--url https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause \
--header 'x-api-key: <api-key>'import requests
url = "https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause', 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://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "66f1c4d2e4b0a1b2c3d4e5f8",
"url": "https://api.example.com/reports/refresh",
"method": "POST",
"timeout_seconds": 120,
"cron_expression": "0 2 * * *",
"timezone": "UTC",
"created_at": "2023-11-07T05:31:56Z",
"headers": {},
"body": "<unknown>",
"max_retries": 3,
"retry_delay": 60,
"label": "Nightly report refresh",
"is_active": true,
"updated_at": "2023-11-07T05:31:56Z",
"next_run_time": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"last_run_success": true,
"last_run_status": 123,
"last_attempt_count": 123
}
HTTP Schedules
Pause HTTP Schedule
Stop an HTTP schedule from firing without deleting it.
POST
/
http-schedules
/
{schedule_id}
/
pause
Pause HTTP schedule
curl --request POST \
--url https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause \
--header 'x-api-key: <api-key>'import requests
url = "https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause', 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://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scheduler.studio.lyzr.ai/http-schedules/{schedule_id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "66f1c4d2e4b0a1b2c3d4e5f8",
"url": "https://api.example.com/reports/refresh",
"method": "POST",
"timeout_seconds": 120,
"cron_expression": "0 2 * * *",
"timezone": "UTC",
"created_at": "2023-11-07T05:31:56Z",
"headers": {},
"body": "<unknown>",
"max_retries": 3,
"retry_delay": 60,
"label": "Nightly report refresh",
"is_active": true,
"updated_at": "2023-11-07T05:31:56Z",
"next_run_time": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"last_run_success": true,
"last_run_status": 123,
"last_attempt_count": 123
}
The schedule keeps its configuration and stops firing until you call Resume HTTP Schedule.
Authorizations
Lyzr API key. Required on every endpoint except Trigger Webhook.
Path Parameters
ID of the schedule.
Example:
"66f1c2a9e4b0a1b2c3d4e5f6"
Response
The paused HTTP schedule.
Example:
"66f1c4d2e4b0a1b2c3d4e5f8"
Example:
"https://api.example.com/reports/refresh"
Example:
"POST"
Example:
120
Example:
"0 2 * * *"
Example:
"UTC"
Show child attributes
Show child attributes
Stored request body.
Example:
"Nightly report refresh"
false when the schedule is paused.
When the schedule will next fire. null while paused.
HTTP status code returned by the target on the most recent run.
Number of attempts the most recent run took.