Skip to main content
POST
/
api
/
v1
/
monitors
/
{id}
/
pause
Pause a monitor (set enabled=false)
curl --request POST \
  --url https://api.devhelm.io/api/v1/monitors/{id}/pause \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.devhelm.io/api/v1/monitors/{id}/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.devhelm.io/api/v1/monitors/{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://api.devhelm.io/api/v1/monitors/{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 => [
"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.devhelm.io/api/v1/monitors/{id}/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.devhelm.io/api/v1/monitors/{id}/pause")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.devhelm.io/api/v1/monitors/{id}/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
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organizationId": 123,
    "name": "<string>",
    "config": {
      "hostname": "<string>",
      "recordTypes": [],
      "nameservers": [
        "<string>"
      ],
      "timeoutMs": 123,
      "totalTimeoutMs": 123
    },
    "frequencySeconds": 123,
    "enabled": true,
    "regions": [
      "<string>"
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "assertions": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "monitorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "config": {
          "type": "body_contains",
          "substring": "<string>"
        }
      }
    ],
    "tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "organizationId": 123,
        "name": "<string>",
        "color": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ],
    "pingUrl": "<string>",
    "environment": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "slug": "<string>"
    },
    "auth": {
      "type": "bearer",
      "vaultSecretId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "incidentPolicy": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "monitorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "triggerRules": [
        {
          "count": 123,
          "windowMinutes": 123,
          "thresholdMs": 123
        }
      ],
      "confirmation": {
        "type": "multi_region",
        "minRegionsFailing": 123,
        "maxWaitSeconds": 123
      },
      "recovery": {
        "consecutiveSuccesses": 123,
        "minRegionsPassing": 123,
        "cooldownMinutes": 123
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "monitorRegionCount": 123,
      "checkFrequencySeconds": 123
    },
    "alertChannelIds": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ]
  }
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}
{
"status": 404,
"code": "NOT_FOUND",
"message": "Monitor not found",
"timestamp": 1737302400000,
"requestId": "5b6f7a8c-1234-4d5e-9f0a-1b2c3d4e5f6a"
}

Authorizations

Authorization
string
header
required

API key (dh_live_...) or Auth0 JWT token

Path Parameters

id
string<uuid>
required

Response

OK

data
object
required

Full monitor representation