Skip to main content
DELETE
/
monitorings
/
{id}
/
deactivate
Deactivate a monitoring
curl --request DELETE \
  --url https://api.godiligent.ai/monitorings/{id}/deactivate \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.godiligent.ai/monitorings/{id}/deactivate"

headers = {"X-API-KEY": "<api-key>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.godiligent.ai/monitorings/{id}/deactivate', 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.godiligent.ai/monitorings/{id}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://api.godiligent.ai/monitorings/{id}/deactivate"

req, _ := http.NewRequest("DELETE", 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.delete("https://api.godiligent.ai/monitorings/{id}/deactivate")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.godiligent.ai/monitorings/{id}/deactivate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body

Overview

Deactivate a monitoring configuration for the authenticated customer. This operation is idempotent: if the monitoring is already inactive, the request will still succeed.

Request

  • Method: DELETE
  • Path: /monitorings/{id}/deactivate
  • Path Parameters:
    • id (string, required): The monitoring ID to deactivate
  • Authentication: Requires valid customer authentication

Example Request

DELETE /monitorings/123e4567-e89b-12d3-a456-426614174000/deactivate

Responses

  • 204 No Content
    • Monitoring was successfully deactivated
  • 200 OK
    • Monitoring was already inactive (no response body)
  • 404 Not Found
    • Monitoring with the specified ID was not found for the customer
    • Example:
      { "error": "Monitoring not found" }
      
  • 500 Internal Server Error
    • Unexpected server error during deactivation
    • Example:
      { "error": "<error message>" }
      

Error Handling

  • Returns 404 if the monitoring does not exist for the customer
  • Returns 500 with error details if an unexpected error occurs

Notes

  • This endpoint is safe to call multiple times; deactivating an already inactive monitoring is not an error
  • Only the owner (customer) of the monitoring may deactivate it

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string
required
Example:

"d6e3b214-30b1-4401-a1b8-a1bd3c6a84e4"

Response

No Content