curl -X POST https://api.stophy.dev/v1/monitor/{id}/run \
-H "Authorization: Bearer $STOPHY_API_KEY"
const response = await fetch("https://api.stophy.dev/v1/monitor/{id}/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
},
});
console.log(await response.json());
import os
import requests
response = requests.post(
"https://api.stophy.dev/v1/monitor/{id}/run",
headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
)
print(response.json())
{
"success": true,
"creditsUsed": 123,
"costUsd": 123,
"requestId": "<string>",
"id": "<string>",
"data": {
"id": "<string>",
"monitorId": "<string>",
"status": "queued",
"trigger": "scheduled",
"scheduledFor": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"estimatedCredits": 123,
"estimatedCostUsd": 123,
"reservedCredits": 123,
"actualCredits": 123,
"actualCostUsd": 123,
"billingStatus": "not_applicable",
"summary": {
"totalPages": 123,
"same": 123,
"changed": 123,
"new": 123,
"removed": 123,
"error": 123
},
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"next": "<string>"
}{
"success": false,
"error": "<string>",
"code": "apiKeyRequired",
"retryable": true,
"retryAfterSeconds": 123,
"requestId": "<string>",
"requiredCredits": 123,
"availableCredits": 123,
"requiredUsd": 123,
"availableUsd": 123,
"billingUrl": "<string>",
"signupUrl": "https://stophy.dev/signup",
"signup": "POST https://api.stophy.dev/v1/signup"
}{
"success": false,
"error": "<string>",
"code": "apiKeyRequired",
"retryable": true,
"retryAfterSeconds": 123,
"requestId": "<string>",
"requiredCredits": 123,
"availableCredits": 123,
"requiredUsd": 123,
"availableUsd": 123,
"billingUrl": "<string>",
"signupUrl": "https://stophy.dev/signup",
"signup": "POST https://api.stophy.dev/v1/signup"
}Monitors
Run a monitor
Check the monitor now, outside its schedule. Answers 409 while a check is running. Costs what the pages cost. Send one request and get JSON back.
POST
/
v1
/
monitor
/
{id}
/
run
curl -X POST https://api.stophy.dev/v1/monitor/{id}/run \
-H "Authorization: Bearer $STOPHY_API_KEY"
const response = await fetch("https://api.stophy.dev/v1/monitor/{id}/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
},
});
console.log(await response.json());
import os
import requests
response = requests.post(
"https://api.stophy.dev/v1/monitor/{id}/run",
headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
)
print(response.json())
{
"success": true,
"creditsUsed": 123,
"costUsd": 123,
"requestId": "<string>",
"id": "<string>",
"data": {
"id": "<string>",
"monitorId": "<string>",
"status": "queued",
"trigger": "scheduled",
"scheduledFor": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"estimatedCredits": 123,
"estimatedCostUsd": 123,
"reservedCredits": 123,
"actualCredits": 123,
"actualCostUsd": 123,
"billingStatus": "not_applicable",
"summary": {
"totalPages": 123,
"same": 123,
"changed": 123,
"new": 123,
"removed": 123,
"error": 123
},
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"next": "<string>"
}{
"success": false,
"error": "<string>",
"code": "apiKeyRequired",
"retryable": true,
"retryAfterSeconds": 123,
"requestId": "<string>",
"requiredCredits": 123,
"availableCredits": 123,
"requiredUsd": 123,
"availableUsd": 123,
"billingUrl": "<string>",
"signupUrl": "https://stophy.dev/signup",
"signup": "POST https://api.stophy.dev/v1/signup"
}{
"success": false,
"error": "<string>",
"code": "apiKeyRequired",
"retryable": true,
"retryAfterSeconds": 123,
"requestId": "<string>",
"requiredCredits": 123,
"availableCredits": 123,
"requiredUsd": 123,
"availableUsd": 123,
"billingUrl": "<string>",
"signupUrl": "https://stophy.dev/signup",
"signup": "POST https://api.stophy.dev/v1/signup"
}Price
$1 per 1,000 pages read, the same as a scheduled check. See Pricing.No example is recorded: a check reads every page of the monitor and costs what the pages cost.
curl -X POST https://api.stophy.dev/v1/monitor/{id}/run \
-H "Authorization: Bearer $STOPHY_API_KEY"
const response = await fetch("https://api.stophy.dev/v1/monitor/{id}/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
},
});
console.log(await response.json());
import os
import requests
response = requests.post(
"https://api.stophy.dev/v1/monitor/{id}/run",
headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
)
print(response.json())