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 Name | Endpoint | Parameters | |
---|---|---|---|
Single Item | https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/resource.json?id= | Revision: | A number or "current" for the latest data. |
Formats: |
| ||
id={id} | Mandatory. The ID of the item to retrieve |
Examples
Item Type | Category |
---|---|
Id | http://environment.data.gov.uk/asset-management/id/drl/BeachStructure |
Format | csv |
URL | https://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 Type | Asset-type |
---|---|
Id | http://environment.data.gov.uk/asset-management/id/drl/Groyne |
Format | json |
URL | https://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 Type | Element |
---|---|
Id | http://environment.data.gov.uk/asset-management/id/drl/Groyne-crest |
Format | rdf |
URL | https://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 Type | Attribute |
---|---|
Id | http://environment.data.gov.uk/asset-management/id/drl/Groyne-asset-status |
Format | ttl |
URL | https://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 Type | Picklist |
---|---|
Id | http://environment.data.gov.uk/asset-management/id/drl/AssetStatus |
Format | csv |
URL | https://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 formathttp://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 encodedboolean
: EitherTRUE
orFALSE
, case insensitive.
The data for each type can be requested as json, csv, ttl, or rdf.
API Specification
API Name | Endpoint | Parameters | |
---|---|---|---|
Categories | https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/categories.json | Revision: | A number or "current" for the latest data. |
Formats: |
| ||
id={id} | Filter by id. This parameter type is id . | ||
label={label} | Filter by label. This parameter type is string . | ||
Asset types | https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/asset-types.json | Revision: | A number or "current" for the latest data. |
Formats: |
| ||
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 . | ||
Elements | https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/elements.json | Revision: | A number or "current" for the latest data. |
Formats: |
| ||
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 . | ||
Attributes | https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/attributes.json | Revision: | A number or "current" for the latest data. |
Formats: |
| ||
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 . | ||
Picklists | https://environment.data.gov.uk/asset-management/drl-app/revision/current/api/list/picklists.json | Revision: | A number or "current" for the latest data. |
Formats: |
| ||
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 Type | Category |
---|---|
Format | json |
URL | https://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 |
Filters | label = Beach Structure |
id = http://environment.data.gov.uk/asset-management/id/drl/BeachStructure |
List Type | Asset-type |
---|---|
Format | csv |
URL | https://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 |
Filters | 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 |
List Type | Element |
---|---|
Format | json |
URL | https://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 |
Filters | 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 |
List Type | Attribute |
---|---|
Format | csv |
URL | https://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 |
Filters | attribute-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 Type | Picklist |
---|---|
Format | json |
URL | https://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 |
Filters | label = 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 Name | Endpoint |
---|---|
Revision history | https://environment.data.gov.uk/asset-management/drl-app/history.json |