Overview
Check API health
Returns healthy and the server time when the API is up. No API key is needed and the call doesn’t count against your quota.
GET
/
health
Check API health
curl --request GET \
--url https://api.thestatsapi.com/api/healthconst options = {method: 'GET'};
fetch('https://api.thestatsapi.com/api/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/health"
response = requests.get(url)
print(response.text){
"status": "healthy",
"timestamp": "2023-11-07T05:31:56Z"
}Use it for uptime monitoring. To check that your key works, call any other endpoint, such as List competitions.
⌘I
Check API health
curl --request GET \
--url https://api.thestatsapi.com/api/healthconst options = {method: 'GET'};
fetch('https://api.thestatsapi.com/api/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/health"
response = requests.get(url)
print(response.text){
"status": "healthy",
"timestamp": "2023-11-07T05:31:56Z"
}