# API status

Source: https://help.ruuster.com/idx/status

> Check whether the Ruuster Listings API is up and whether it is paused, with no key, for your uptime monitor.

```http
GET https://idx.ruuster.com/v1/status
```

no key · free · cached 30 s

Whether the API is up. It needs no key and costs nothing, so point your uptime monitor at it.
`paused` is true while Ruuster has paused the API for maintenance, when other calls answer 503
`api_paused`. [Status and uptime](https://help.ruuster.com/idx/service-status).

## Query parameters

This call takes no query parameters.

## Response

The answer is `{ ok: true, data, meta }`. These are the fields of `data`; `meta` carries `brokerageId`, `freshness.asOf`, `mls` (each board's display rules) and `canonical`.

| Field | Type | Description |
|---|---|---|
| `status` | string (enum) | One of `ok`. |
| `version` | string |  |
| `paused` | boolean |  |

## Errors

These are the error codes this endpoint can answer. Every error has the same body; [Errors](https://help.ruuster.com/idx/reference-errors) explains each code and what to show.

`invalid_parameter`, `internal_error`, `api_paused`, `source_unavailable`

## Example request

cURL:

```bash
curl -s "https://idx.ruuster.com/v1/status"
```

TypeScript:

```typescript
import { createClient } from "@ruuster/idx";

const idx = createClient({ secretKey: process.env.IDX_SECRET_KEY });

const r = await idx.status();
if (!r.ok) throw new Error(`${r.error.code}: ${r.error.message}`);
console.log(r.data);
```

Python:

```python
import requests

res = requests.get(
    "https://idx.ruuster.com/v1/status",
    timeout=30,
)
body = res.json()
if not body["ok"]:
    raise RuntimeError(body["error"]["code"] + ": " + body["error"]["message"])
print(body["data"])
```

PHP:

```php
<?php

$ch = curl_init('https://idx.ruuster.com/v1/status');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$body['ok']) {
    throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
```

## Example response

```json
{
  "ok": true,
  "data": {
    "status": "ok",
    "version": "v1",
    "paused": false
  }
}
```
