# Server Status API

The endpoint for the server status API is: `/citydriving/live`

## API Index

We currently offer the following server status APIs:

| API                    | Documentation                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------- |
| Server Status Overview | [View Docs](/apis/citydriving-statistics-api/server-status-api.md#server-status-overview) |

## Server Status Overview

The server status overview gives details such as online status, track code, track name and the number of allowed and connected guests.

**ENDPOINT:** `/citydriving/live/status`

### Mandatory Parameters

| Name     | Expected Value                                                |
| -------- | ------------------------------------------------------------- |
| `key`    | *{string}* : API Key                                          |
| `server` | *{string}* : all \| one \| two \| three \| events \| training |

### Example

**REQUEST:** `?key=YOUR_KEY&server=all`

This example request will return the status of all servers.

**RESPONSE:**

```
GET https://api.tc-gaming.co.uk/citydriving/live/status?key=YOUR_KEY&server=all
HTTP/1.1 200 OK
```

```javascript
{
  "one": {
    "online": true,
    "track": "KY3X",
    "guests": 40,
    "maxGuests": 40,
    "trackName": "Kyoto"
  },
  "two": {
    "online": true,
    "track": "KY3X",
    "guests": 38,
    "maxGuests": 40,
    "trackName": "Kyoto"
  },
  "three": {
    "online": true,
    "track": "BL1X",
    "guests": 7,
    "maxGuests": 40,
    "trackName": "Blackwood"
  },
  "events": {
    "online": true,
    "track": "RO1X",
    "guests": 0,
    "maxGuests": 47,
    "trackName": "Corby"
  },
  "training": {
    "online": true,
    "track": "AS5X",
    "guests": 0,
    "maxGuests": 32,
    "trackName": "Montana"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.tc-gaming.co.uk/apis/citydriving-statistics-api/server-status-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
