GET | https://<api base path>/v1.0/objects/feed |
Retrieves the Atom Feed which provides entries containing newly issued warnings and updates to warnings, including cancellations and expirations. The updated entries persist for 24 hours only from the point they are added.
The URL above will have been supplied to you when you signed up and were given your API key.
x-api-key
- the key for authenticating your API request.
200
status code with the Atom Feed xml content. The entries are ordered chronologically with the most recent update listed first and they persist for 24 hours. The xml content will follow the formal Atom Feed Specification document. For further information about the Atom Feed specification, see Introduction to Atom
403
authentication has failed, is your API key correct?
429
you have made too many requests to the API within a short period of time and rate-limiting has been triggered
Making a request
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Met Office Warnings Feed</title>
<link rel="self" type="application/atom+xml" href="https://<api base path>/v1.0/objects/feed/" />
<link rel="related" type="application/vnd.geo+json" href="https://<api base path>/v1.0/objects/issued/3f4ca4cf-32ea-4eef-aed0-75db50d94e02/" title="Latest version of all issued warnings" />
<author>
<name>Met Office</name>
<uri>https://www.metoffice.gov.uk</uri>
</author>
<id>urn:uuid:f6b54389-c75c-4f23-aa21-88ef3481761a</id>
<rights>Crown Copyright © 2022 Met Office</rights>
<updated>2022-06-16T13:39:02Z</updated>
<entry>
<title>Update</title>
<link rel="alternate" type="application/vnd.geo+json" href="https://<api base path>/v1.0/objects/updated/c9ce3dca-13e0-4eaf-8f74-cf44ec04279c/" title="Warnings Updated" />
<id>urn:uuid:c9ce3dca-13e0-4eaf-8f74-cf44ec04279c</id>
<updated>2022-06-15T23:00:10Z</updated>
<summary>Warnings update that can include new warnings and warnings state changes from ISSUED to CANCELLED or EXPIRED.</summary>
</entry>
</feed>
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Met Office Warnings Feed</title>
<link rel="self" type="application/atom+xml" href="https://<api base path>/v1.0/objects/feed/" />
<link rel="related" type="application/vnd.geo+json" href="https://<api base path>/v1.0/objects/issued/f6b54389-c75c-4f23-aa21-88ef3481761a/" title="Latest version of all issued warnings" />
<author>
<name>Met Office</name>
<uri>https://www.metoffice.gov.uk</uri>
</author>
<id>urn:uuid:3a15ebde-07ea-4d65-902d-e61649bfe3ce</id>
<rights>Crown Copyright © 2022 Met Office</rights>
<updated>2022-06-03T23:00:10Z</updated>
</feed>
Your application needs to read the Atom feed XML document as data. (There are many libraries which can help with this, either ones specifically created for use with Atom Feeds, or ones designed to read XML generally.) This will enable the application to retrieve the link
data which it needs to get further information, and also allow it to read the UTC date-times of when specific changes occurred. This is important if you want to know whether anything has changed since the last time the application read the Atom Feed.
feed
section at the head of the document: it can be found in the href
attribute of the link
item with the rel
attribute related
. (See both examples above). For ease of human reading, this link is also marked with the title “Latest version of all issued warnings”.entry
item for that change: it is in the href
attribute of the link
item with the rel
attribute alternate
. (See the second example above.) For ease of human reading, this link is also marked with the title “Warnings Updated”.