Pause a Monitor
curl --request POST \
--url https://api.spidra.io/api/monitors/{monitorId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/monitors/{monitorId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spidra.io/api/monitors/{monitorId}/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://api.spidra.io/api/monitors/{monitorId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.spidra.io/api/monitors/{monitorId}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.spidra.io/api/monitors/{monitorId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/monitors/{monitorId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"monitor": {
"id": "<string>",
"name": "<string>",
"status": "active",
"sources": [
{
"kind": "template",
"id": "<string>",
"label": "<string>",
"template": "<string>",
"inputs": {},
"presetId": "<string>",
"urls": [
"<string>"
]
}
],
"schedule": {
"every": "5m",
"at": "<string>",
"day": 3,
"cron": "<string>",
"timezone": "<string>"
},
"cron": "<string>",
"alertOn": "<string>",
"watchFields": [
"<string>"
],
"rule": {
"field": "<string>",
"op": "lt",
"value": 123
},
"goal": "<string>",
"notify": {
"email": {
"enabled": true,
"recipients": [
"<string>"
]
},
"webhook": {
"url": "<string>",
"secret": "<string>"
},
"slack": {
"webhookUrl": "<string>"
},
"discord": {
"webhookUrl": "<string>"
}
},
"nextRunAt": "2023-11-07T05:31:56Z",
"lastCheckAt": "2023-11-07T05:31:56Z",
"lastChangeAt": "2023-11-07T05:31:56Z",
"lastStatus": "<string>",
"lastSummary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}Monitors
Pause a Monitor
Stop scheduled checks until you resume the monitor.
POST
/
monitors
/
{monitorId}
/
pause
Pause a Monitor
curl --request POST \
--url https://api.spidra.io/api/monitors/{monitorId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/monitors/{monitorId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spidra.io/api/monitors/{monitorId}/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://api.spidra.io/api/monitors/{monitorId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.spidra.io/api/monitors/{monitorId}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.spidra.io/api/monitors/{monitorId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/monitors/{monitorId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"monitor": {
"id": "<string>",
"name": "<string>",
"status": "active",
"sources": [
{
"kind": "template",
"id": "<string>",
"label": "<string>",
"template": "<string>",
"inputs": {},
"presetId": "<string>",
"urls": [
"<string>"
]
}
],
"schedule": {
"every": "5m",
"at": "<string>",
"day": 3,
"cron": "<string>",
"timezone": "<string>"
},
"cron": "<string>",
"alertOn": "<string>",
"watchFields": [
"<string>"
],
"rule": {
"field": "<string>",
"op": "lt",
"value": 123
},
"goal": "<string>",
"notify": {
"email": {
"enabled": true,
"recipients": [
"<string>"
]
},
"webhook": {
"url": "<string>",
"secret": "<string>"
},
"slack": {
"webhookUrl": "<string>"
},
"discord": {
"webhookUrl": "<string>"
}
},
"nextRunAt": "2023-11-07T05:31:56Z",
"lastCheckAt": "2023-11-07T05:31:56Z",
"lastChangeAt": "2023-11-07T05:31:56Z",
"lastStatus": "<string>",
"lastSummary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}curl -X POST https://api.spidra.io/api/monitors/d6761e12-b011-4633-a593-fa6be2ef466c/pause \
-H "Authorization: Bearer $SPIDRA_API_KEY"
"status": "paused" and "nextRunAt": null. Its history is kept, and it still counts toward your plan’s monitor limit. Resume it to start checks again.
Spidra also pauses a monitor whose last 5 checks all failed, and emails you, so a broken source doesn’t keep using credits.Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The monitor's ID.
Was this page helpful?

