Automatic Roster System Logo
Back to API Overview

GET /api/status

Check the status of the API.

Overview

This endpoint returns the current status of the API, including the API version and timestamp. Use this endpoint to check if the API is operational and to verify your API key is working correctly.

This is also useful for testing connectivity to the API before making more complex requests.

Parameters

This endpoint does not accept any parameters.

Headers

Name Required Description
X-API-Key Yes Your API key for authentication

Response

Response Fields

Field Type Description
status string The status of the API (online/offline)
version string The current API version
timestamp string The current server timestamp in ISO 8601 format

Example Response

{
  "status": "online",
  "version": "1.0.0",
  "timestamp": "2025-03-10T15:30:45.123Z"
}

Error Responses

401 Unauthorized

{
  "error": "Invalid or missing API key"
}

403 Forbidden

{
  "error": "API access requires premium subscription"
}

Code Examples

cURL

curl -X GET "https://autorosters.com/api/status" \
     -H "X-API-Key: your-api-key-here"

Python

import requests

api_key = "your-api-key-here"
url = "https://autorosters.com/api/status"

headers = {
    "X-API-Key": api_key
}

response = requests.get(url, headers=headers)
data = response.json()

print(data)

JavaScript

const apiKey = "your-api-key-here";
const url = "https://autorosters.com/api/status";

fetch(url, {
  method: "GET",
  headers: {
    "X-API-Key": apiKey
  }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));