# Status and uptime

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

> Check whether the Ruuster Listings API is up with GET /v1/status, monitor it from your uptime tool, and know what a pause means for your site.

`GET /v1/status` answers whether the API is up. It needs no key and costs nothing, so point your uptime
monitor at it.

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']);
```

- `data.status` is `ok` whenever the API is answering.
- `data.paused` is true while Ruuster has paused the API for maintenance. Other calls then answer 503
  `api_paused` with a `Retry-After`.
- `data.version` is the API version, `v1`.

## What a pause or an outage means for your site

When your pages cache their renders and throw on 503, a pause or an outage never shows your visitors an
error: your cache keeps serving the last good pages until the API answers again
([Caching](https://help.ruuster.com/idx/caching)).

## Notices

Planned maintenance is announced ahead of time by email to your account's contacts. For anything
urgent, email `helpme@ruuster.com` or call 312-948-5402 ([Support](https://help.ruuster.com/idx/support)).
