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_bodyMonitoring
Deactivate Monitoring
Deactivate a monitoring configuration for a customer. Idempotent and safe to repeat.
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_bodyOverview
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
404if the monitoring does not exist for the customer - Returns
500with 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
⌘I