Viewing latest data (updated 18/04/2024 10:00)

Data Requirements Library API

These are the DRL API Docs, switch to Asset Management API Docs.

The Data Requirements Library documents the terminology and categories used to classify and describe Environment Agency (EA) assets. It also documents the specific data attributes that are used to describe the properties of each Asset Type and its Element Types.

The EA has identified different types of Asset. These Asset Types are grouped into Asset Category groupings.

Data about each Asset Type, Element Type and their attributes can be accessed via this API in json, csv, ttl, and rdf formats. These formats can be directly queried by remote applications to support supplier-side automation.

About the data

These APIs provide access to DRL Categories, Asset Types and Element Types and their Attributes, and to Picklist data as referenced by the Attributes.

Each one of these types has a uri id which is prefixed http://environment.data.gov.uk/asset-management/id/drl/ and followed by a readable representation of the item name.

For example, the id for Beach Structure is http://environment.data.gov.uk/asset-management/id/drl/BeachStructure.

Items in the DRL can be accessed individually by id or via the list APIs by type. The list APIs are filterable by some but not all of the attributes on each type, as documented below.

The DRL provides access to historic data and this can also be accessed via the API, each API http request specifies a revision in the path and editing this will ensure that only data from that revision is returned. The default revision is "current" which represents the current live version as accessed through the DRL application. Alternative values can be found by clicking the View History link at the top of the page and navigating to the required date.

Request single item by item id API

This API provides access to DRL data for a single item with a known id. The same interface is provided for all DRL item types.

To request a single item make a http get request to https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.json with a query parameter named id containing the id of the desired item. Change the file extention from .json to .csv, .ttl, or .rdf to request an alternative format.

API Specification

API NameEndpointParameters
Single Itemhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.json?id=Revision:A number or "current" for the latest data.
Formats:
  • csv
  • json
  • rdf
  • ttl
id={id}Mandatory. The ID of the item to retrieve

Examples

Item TypeCategory
Idhttp://environment.data.gov.uk/asset-management/id/drl/BeachStructure
Formatcsv
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.csv?id=http://environment.data.gov.uk/asset-management/id/drl/BeachStructure
Item TypeAsset-type
Idhttp://environment.data.gov.uk/asset-management/id/drl/Groyne
Formatjson
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.json?id=http://environment.data.gov.uk/asset-management/id/drl/Groyne
Item TypeElement
Idhttp://environment.data.gov.uk/asset-management/id/drl/Groyne-crest
Formatrdf
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.rdf?id=http://environment.data.gov.uk/asset-management/id/drl/Groyne-crest
Item TypeAttribute
Idhttp://environment.data.gov.uk/asset-management/id/drl/Groyne-asset-status
Formatttl
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.ttl?id=http://environment.data.gov.uk/asset-management/id/drl/Groyne-asset-status
Item TypePicklist
Idhttp://environment.data.gov.uk/asset-management/id/drl/AssetStatus
Formatcsv
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.csv?id=http://environment.data.gov.uk/asset-management/id/drl/AssetStatus

Request multiple items by item type

This API provides access to the DRL data by item type for Categories, Asset Types, Element Types, Attributes, and Picklists.

The APIs are filterable using query parameters and using the filters is recommended to reduce response size, particularly for the attributes API. These filter parameters are available in different types with different usage requirements as follows.

  • id: The filter should be an id of something that exists in the format http://environment.data.gov.uk/asset-management/id/drl/{DistinguishingTagHere}. It is recommended that ids containing special characters are url encoded.
  • string: Exact match string search. There can be used for labels as well as various codes. Values containing spaces should be url encoded
  • boolean: Either TRUE or FALSE, case insensitive.

The data for each type can be requested as json, csv, ttl, or rdf.

API Specification

API NameEndpointParameters
Categorieshttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/categories.jsonRevision:A number or "current" for the latest data.
Formats:
  • csv
  • json
  • rdf
  • ttl
id={id}Filter by id. This parameter type is id.
label={label}Filter by label. This parameter type is string.
Asset typeshttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/asset-types.jsonRevision:A number or "current" for the latest data.
Formats:
  • csv
  • json
  • rdf
  • ttl
id={id}Filter by id. This parameter type is id.
label={label}Filter by label. This parameter type is string.
category={category}Filter by category. This parameter type is id.
geometry-type={geometry-type}Filter by geometry-type. This parameter type is string.
Elementshttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/elements.jsonRevision:A number or "current" for the latest data.
Formats:
  • csv
  • json
  • rdf
  • ttl
id={id}Filter by id. This parameter type is id.
label={label}Filter by label. This parameter type is string.
element-code={element-code}Filter by element-code. This parameter type is string.
asset-type={asset-type}Filter by asset-type. This parameter type is id.
essential={essential}Filter by essential. This parameter type is boolean.
Attributeshttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/attributes.jsonRevision:A number or "current" for the latest data.
Formats:
  • csv
  • json
  • rdf
  • ttl
id={id}Filter by id. This parameter type is id.
label={label}Filter by label. This parameter type is string.
attribute-of={attribute-of}Filter by attribute-of. This parameter type is id.
geocobie-mapping={geocobie-mapping}Filter by geocobie-mapping. This parameter type is string.
delivery={delivery}Filter by delivery. This parameter type is string.
Picklistshttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/picklists.jsonRevision:A number or "current" for the latest data.
Formats:
  • csv
  • json
  • rdf
  • ttl
id={id}Filter by id. This parameter type is id.
label={label}Filter by label. This parameter type is string.

Examples

These example requests have a 50 items response limit set for performance reasons. The limit is useful for testing the API but is not required usage outside of this page.

List TypeCategory
Formatjson
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/categories.json?limit=50&label=Beach%20Structure&id=http://environment.data.gov.uk/asset-management/id/drl/BeachStructure
Filterslabel = Beach Structure
id = http://environment.data.gov.uk/asset-management/id/drl/BeachStructure
List TypeAsset-type
Formatcsv
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/asset-types.csv?limit=50&category=http://environment.data.gov.uk/asset-management/id/drl/BeachStructure&label=Groyne&id=http://environment.data.gov.uk/asset-management/id/drl/Groyne&geometry-type=Line
Filterscategory = http://environment.data.gov.uk/asset-management/id/drl/BeachStructure
label = Groyne
id = http://environment.data.gov.uk/asset-management/id/drl/Groyne
geometry-type = Line
List TypeElement
Formatjson
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/elements.json?limit=50&asset-type=http://environment.data.gov.uk/asset-management/id/drl/Groyne&element-code=CRT&label=Crest&id=http://environment.data.gov.uk/asset-management/id/drl/Groyne-crest&essential=true
Filtersasset-type = http://environment.data.gov.uk/asset-management/id/drl/Groyne
element-code = CRT
label = Crest
id = http://environment.data.gov.uk/asset-management/id/drl/Groyne-crest
essential = true
List TypeAttribute
Formatcsv
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/attributes.csv?limit=50&attribute-of=http://environment.data.gov.uk/asset-management/id/drl/Groyne&geocobie-mapping=Feature.Attribute.Name.AssetStatus&delivery=EA5&label=Asset%20Status&id=http://environment.data.gov.uk/asset-management/id/drl/Groyne-asset-status
Filtersattribute-of = http://environment.data.gov.uk/asset-management/id/drl/Groyne
geocobie-mapping = Feature.Attribute.Name.AssetStatus
delivery = EA5
label = Asset Status
id = http://environment.data.gov.uk/asset-management/id/drl/Groyne-asset-status
List TypePicklist
Formatjson
URLhttps://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/picklists.json?limit=50&label=Asset%20Status&id=http://environment.data.gov.uk/asset-management/id/drl/AssetStatus
Filterslabel = Asset Status
id = http://environment.data.gov.uk/asset-management/id/drl/AssetStatus

List revision history

Data changes made to the DRL are published as new versioned revisions, with the old revisions still accessible through the website and here through the API

This API accepts no arguments and returns the full list of revisions as json. Each revision in the list contains the revision number, the revision id, and the published date in yyyy-MM-ddTHH:mm:ss format.

The ordering of the API results is not guaranteed, the revision number can be used for sorting when consuming the data and is prefered over the published at date.

API Specification

API NameEndpoint
Revision historyhttps://environment.data.gov.uk/asset-management/drl-app/history.json

Try the API

URLhttps://environment.data.gov.uk/asset-management/drl-app/history.json