Health check
curl --request GET \
--url https://app.tryspecter.com/api/v1/healthimport requests
url = "https://app.tryspecter.com/api/v1/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.tryspecter.com/api/v1/health', 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://app.tryspecter.com/api/v1/health",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.tryspecter.com/api/v1/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.tryspecter.com/api/v1/health")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "OK",
"postgres": "OK",
"clickhouse": "OK"
}{
"status": "ERROR",
"postgres": "OK",
"clickhouse": "ERROR"
}Account
Health check
Returns HTTP 200 with {"status":"OK"} while the API is up, serving traffic, and able to reach both of its backing databases.
Free. This call does not consume credits.
What you need
Nothing. This endpoint is unauthenticated and requires no API key.
Behaviour
A lightweight status check for uptime monitoring. It returns 200 with { "status": "OK" } when the API is up and both backing databases are reachable. If a database is unreachable it returns 503, with each dependency reported individually so you can see which is failing.
GET
/
health
Health check
curl --request GET \
--url https://app.tryspecter.com/api/v1/healthimport requests
url = "https://app.tryspecter.com/api/v1/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.tryspecter.com/api/v1/health', 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://app.tryspecter.com/api/v1/health",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.tryspecter.com/api/v1/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.tryspecter.com/api/v1/health")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "OK",
"postgres": "OK",
"clickhouse": "OK"
}{
"status": "ERROR",
"postgres": "OK",
"clickhouse": "ERROR"
}Was this page helpful?