# Status API

## Endpoint[​](#endpoint "Direct link to Endpoint")

Please note the status APIs use a different subdomain:

```
https://meta.ideal-postcodes.co.uk/
```

## Service Status API[​](#service-status-api "Direct link to Service Status API")

```
GET /status
```

The status API is a simple way to view our current availability status.

This endpoint aggregates responses from our 3rd party availability monitors and reports a service as down if all probes agree.

This API currently powers the availability table on [status.ideal-postcodes.co.uk](https://status.ideal-postcodes.co.uk).

## Implementation Notes[​](#implementation-notes "Direct link to Implementation Notes")

In terms of implementation, we recommend watching for status numbers of `2` to detect issues on the API (i.e. instead of watching for status numbers which are not `1`).

### Request[​](#request "Direct link to Request")

```
https://meta.ideal-postcodes.co.uk/status
```

### Response[​](#response "Direct link to Response")

```
{

	"Ideal Postcodes Website": {

		"status": 1,

		"message": "Up"

	},

	"Ideal Postcodes API": {

		"status": 1,

		"message": "Up"

	},

	"Postcodes.io API": {

		"status": 1,

		"message": "Up"

	}

}
```

| Property                    | Description                                                             |
| --------------------------- | ----------------------------------------------------------------------- |
| `"Ideal Postcodes Website"` | Object attribute which denotes a specific service                       |
| `"service.status"`          | `number` Indicates the current state of the service                     |
| `"service.message"`         | `string` Human readable message that corresponds with the status number |

### Status Numbers[​](#status-numbers "Direct link to Status Numbers")

| Status | Description                                                                                                                                                                                       |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0`    | **Uninitialised** - meta.ideal-postcodes.co.uk needs time (minute or so) to retrieve data from all probes. This status is rare and occurs in the event of a full cache eviction of probe statuses |
| `1`    | **Available** - Service is up                                                                                                                                                                     |
| `2`    | **Down** - Service is down                                                                                                                                                                        |

### Current Tracked Services[​](#current-tracked-services "Direct link to Current Tracked Services")

| Service                     | Description                                                    |
| --------------------------- | -------------------------------------------------------------- |
| `"Ideal Postcodes Website"` | [ideal-postcodes.co.uk](https://ideal-postcodes.co.uk)         |
| `"Ideal Postcodes API"`     | [api.ideal-postcodes.co.uk](https://api.ideal-postcodes.co.uk) |
| `"Postcodes.io API"`        | [postcodes.io](https://postcodes.io)                           |

## Incidents Feeds[​](#incidents-feeds "Direct link to Incidents Feeds")

```
GET /history.[json|rss|atom]
```

The incidents feeds are a pollable endpoint that return information on historical and ongoing incidents affecting our services.

This API currently powers the incidents table on [status.ideal-postcodes.co.uk](https://status.ideal-postcodes.co.uk).

### JSON Feed: Request[​](#json-feed-request "Direct link to JSON Feed: Request")

```
https://meta.ideal-postcodes.co.uk/history.json
```

### JSON Feed: Response[​](#json-feed-response "Direct link to JSON Feed: Response")

```
{

  "version":"https://jsonfeed.org/version/1",

  "title":"Ideal Postcodes Status - Incident History",

  "home_page_url":"https://status.ideal-postcodes.co.uk",

  "feed_url":"https://meta.ideal-postcodes.co.uk/history.json",

  "icon":"https://img.ideal-postcodes.co.uk/House%20White%20Gradient%20Icon%403x.png",

  "author":{

    "name":"Ideal Postcodes",

    "url":"https://ideal-postcodes.co.uk"

  },

  "items":[

    {

      "id":"6",

      "content_html":"<p><small>0:00 UTC</small><br/><strong>Identified</strong> - We observed periodic 500 exceptions from our edge webservers as traffic increases this morning. This is due to webserver upgrades and migration to Cloudflare at around 10pm UTC 29/10/2020. We rolled back to our earlier edge webserver infrastructure until the issue can be remedied.</p><p><small>14:32 UTC</small><br/><strong>Resolved</strong> - The source of the issue remedied. The new edge infrastructures is now receiving all traffic and operating at a 0% exception rate.`,</p>",

      "url":"https://status.ideal-postcodes.co.uk",

      "title":"Postcodes.io 500 Errors",

      "date_modified":"2020-10-29T00:00:00.000Z",

      "date_published":"2020-10-29T00:00:00.000Z"

    }

  ]

}
```

### Atom Feed: Request[​](#atom-feed-request "Direct link to Atom Feed: Request")

```
https://meta.ideal-postcodes.co.uk/history.atom
```

### Atom Feed: Response[​](#atom-feed-response "Direct link to Atom Feed: Response")

```
<?xml version="1.0" encoding="UTF-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">

  <id>https://status.ideal-postcodes.co.uk</id>

  <title>Ideal Postcodes Status - Incident History</title>

  <updated>2020-10-29T14:32:00.000Z</updated>

  <generator>https://github.com/jpmonette/feed</generator>

  <author>

    <name>Ideal Postcodes</name>

    <email>support@ideal-postcodes.co.uk</email>

    <uri>https://ideal-postcodes.co.uk</uri>

  </author>

  <link rel="alternate" href="https://status.ideal-postcodes.co.uk" />

  <link rel="self" href="https://meta.ideal-postcodes.co.uk/history.atom" />

  <logo>https://img.ideal-postcodes.co.uk/House%20White%20Gradient%20Icon%403x.png</logo>

  <icon>http://img.ideal-postcodes.co.uk/favicon.svg</icon>

  <rights>IDDQD Limited</rights>

  <entry>

    <title type="html"><![CDATA[Postcodes.io 500 Errors]]></title>

    <id>6</id>

    <link href="https://status.ideal-postcodes.co.uk" />

    <updated>2020-10-29T00:00:00.000Z</updated>

    <content type="html"><![CDATA[<p><small>0:00 UTC</small><br/><strong>Identified</strong> - We observed periodic 500 exceptions from our edge webservers as traffic increases this morning. This is due to webserver upgrades and migration to Cloudflare at around 10pm UTC 29/10/2020. We rolled back to our earlier edge webserver infrastructure until the issue can be remedied.</p><p><small>14:32 UTC</small><br/><strong>Resolved</strong> - The source of the issue remedied. The new edge infrastructures is now receiving all traffic and operating at a 0% exception rate.`,</p>]]></content>

    <published>2020-10-29T00:00:00.000Z</published>

  </entry>

</feed>
```

### RSS Feed: Request[​](#rss-feed-request "Direct link to RSS Feed: Request")

```
https://meta.ideal-postcodes.co.uk/history.rss
```

### RSS Feed: Response[​](#rss-feed-response "Direct link to RSS Feed: Response")

```
<?xml version="1.0" encoding="UTF-8"?>

<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">

  <channel>

    <title>Ideal Postcodes Status - Incident History</title>

    <link>https://status.ideal-postcodes.co.uk</link>

    <description>undefined</description>

    <lastBuildDate>Thu, 29 Oct 2020 14:32:00 GMT</lastBuildDate>

    <docs>https://validator.w3.org/feed/docs/rss2.html</docs>

    <generator>https://github.com/jpmonette/feed</generator>

    <language>en</language>

    <image>

      <title>Ideal Postcodes Status - Incident History</title>

      <url>https://img.ideal-postcodes.co.uk/House%20White%20Gradient%20Icon%403x.png</url>

      <link>https://status.ideal-postcodes.co.uk</link>

    </image>

    <copyright>IDDQD Limited</copyright>

    <atom:link href="https://meta.ideal-postcodes.co.uk/history.rss" rel="self" type="application/rss+xml" />

    <item>

      <title><![CDATA[Postcodes.io 500 Errors]]></title>

      <link>https://status.ideal-postcodes.co.uk</link>

      <guid>6</guid>

      <pubDate>Thu, 29 Oct 2020 00:00:00 GMT</pubDate>

      <content:encoded><![CDATA[<p><small>0:00 UTC</small><br/><strong>Identified</strong> - We observed periodic 500 exceptions from our edge webservers as traffic increases this morning. This is due to webserver upgrades and migration to Cloudflare at around 10pm UTC 29/10/2020. We rolled back to our earlier edge webserver infrastructure until the issue can be remedied.</p><p><small>14:32 UTC</small><br/><strong>Resolved</strong> - The source of the issue remedied. The new edge infrastructures is now receiving all traffic and operating at a 0% exception rate.`,</p>]]></content:encoded>

    </item>

  </channel>

</rss>
```
