Check system readiness status
curl --request GET \
--url https://{tenant}/readiness \
--header 'X-Tyk-Authorization: <api-key>'import requests
url = "https://{tenant}/readiness"
headers = {"X-Tyk-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Tyk-Authorization': '<api-key>'}};
fetch('https://{tenant}/readiness', 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://{tenant}/readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Tyk-Authorization: <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://{tenant}/readiness"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tyk-Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/readiness")
.header("X-Tyk-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/readiness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tyk-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "pass",
"status_code": 200,
"components": [
{
"name": "postgres",
"status": "pass",
"observation_ts": "2024-07-29T13:58:56.699052-04:00"
}
]
}{
"status": "fail",
"status_code": 503,
"components": [
{
"name": "postgres",
"status": "fail",
"observation_ts": "2024-07-29T13:58:56.699052-04:00"
}
]
}Health
Check system readiness status
Assesses the readiness of the system and its critical components. This endpoint determines if the system is prepared to handle requests by evaluating the status of essential services and dependencies.
GET
/
readiness
Check system readiness status
curl --request GET \
--url https://{tenant}/readiness \
--header 'X-Tyk-Authorization: <api-key>'import requests
url = "https://{tenant}/readiness"
headers = {"X-Tyk-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Tyk-Authorization': '<api-key>'}};
fetch('https://{tenant}/readiness', 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://{tenant}/readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Tyk-Authorization: <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://{tenant}/readiness"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tyk-Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/readiness")
.header("X-Tyk-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/readiness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tyk-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "pass",
"status_code": 200,
"components": [
{
"name": "postgres",
"status": "pass",
"observation_ts": "2024-07-29T13:58:56.699052-04:00"
}
]
}{
"status": "fail",
"status_code": 503,
"components": [
{
"name": "postgres",
"status": "fail",
"observation_ts": "2024-07-29T13:58:56.699052-04:00"
}
]
}Was this page helpful?
⌘I