LogoLogo
OS Docs HomeOS NGDOS APIsOS Download ProductsMore than MapsOS Data Hub
  • Introduction to OS APIs
  • Core Concepts
    • Getting started with an API project
    • Authentication
    • Error codes
    • Rate-limiting policy
    • OS API branding
    • Service level agreements
    • Service availability dashboard
  • Accessing OS APIs
    • OS Maps API
      • Layers and styles
      • Getting started
        • ESRI ArcGIS Online
        • ESRI ArcGIS Pro
        • ESRI ArcMap
        • Cadcorp SIS
        • MapInfo Pro
        • QGIS
      • Technical specification
        • ZXY
        • WMTS
      • Code examples
    • OS Vector Tile API
      • What data is available?
      • Getting started
        • ESRI ArcGIS Pro
        • Cadcorp SIS
        • QGIS
        • Create a web application using the OS Vector Tile API
      • Technical specification
        • Service Metadata
        • Stylesheet
        • Tile request
      • Code examples
      • Stylesheets
    • OS NGD API – Tiles
    • OS NGD API – Features
    • OS Features API
      • OS Product Archive
      • What data is available?
      • Getting started
        • ArcGIS Online
        • ArcGIS Pro
        • ArcMap
        • Cadcorp SIS
        • MapInfo Pro
        • QGIS
      • Technical specification
        • getCapabilities
        • describeFeatureType
        • getFeature
        • Filtering
        • Paging
        • Empty values
      • Code examples
    • OS Names API
      • Getting started with example queries using Node.js
      • Technical specification
        • Find
        • Nearest
      • Code list
      • Code examples
    • OS Linked Identifiers API
      • What data is available?
      • Getting started with implementing a look-up application
      • Technical specification
        • Identifier
        • Identifier Types
        • Feature Types
        • Product Version Information
      • Code examples
    • OS Places API
      • Getting started with example queries using Node.js
      • Technical specification
        • Find
        • Postcode
        • UPRN
        • Nearest
        • BBOX
        • Radius
        • Polygon
      • Datasets
      • Code lists
      • Code examples
    • OS Match & Cleanse API
      • End of Life Information
      • Getting started with an example match query using Node.js
      • Technical specification
      • Datasets
      • Code lists
    • OS Downloads API
      • Getting started
        • Automating OS OpenData downloads
        • Automating OS Premium data downloads
      • Technical specification
        • OpenData products
        • OpenData product details
        • Download an OpenData product
        • OpenData product image
        • Data packages
        • Data package ID
        • Data package version
        • Data package version ID
        • Download a data package
    • OAuth 2 API
      • Getting started
      • Technical specification
  • Additional resources
    • OS API Wrappers
      • JavaScript
      • Python
      • R
  • Extra Links
    • Accessibility
    • Contact us
    • PSGA Product Summary
    • Terms and conditions
Powered by GitBook
On this page
  • What you need
  • Instructions

Was this helpful?

  1. Accessing OS APIs
  2. OS Linked Identifiers API

Getting started with implementing a look-up application

PreviousWhat data is available?NextTechnical specification

Last updated 4 months ago

Was this helpful?

This guide takes you through the process of implementing an identifier look-up web application using the example available from the GitHub repository.

This is a relatively simple working example that demonstrates how to use the OS Linked Identifiers API. It is a good place to start understanding how to integrate the API into a web application.

These examples use plain HTML, CSS and JavaScript. You can run them by opening the index.html in each folder, or you can serve the examples using a web server, for example .

What you need

  • OS Linked Identifiers API added to an API project in the OS Data Hub with an API Key. See Getting started with an API project for more information.

  • An integrated development environment (IDE) like Visual Studio Code.

Instructions

1

Download the OSLinkedIdentifiersAPI repository

  • Open to the GitHub repository.

  • Click the green Code button.

  • Click Download ZIP.

2

Install the OSLinkedIdentifiersAPI repository

  • Navigate to your Downloads folder and unzip OS-Data-Hub-API-Demos-master.zip. Put the newly unzipped folder in your IDE project folder. When you open your IDE, the new files should appear automatically in your project window.

  • In your IDE navigate to the OSLinkedIdentifiersAPI folder. The folders you have installed contains all the coding required to call and interact with the code libraries.

  • To launch the web-based application navigate to and open the index.html file in the OSLinkedIdentifiersAPI folder. Once you've done this, run the application. Note! The launch method may differ between IDEs. Once you've done this, run the application.

Running the project will launch a window in your browser that looks like this:

The demo application is running on a temporary local server from your own computer. This server is private to your IP address so it cannot be shared with other users. This server will exist as long as your IDE is open. You will have to run the index.html file through your IDE each time you wish to use the demo.

3

Add your API key

To use the demo, open up your My projects page on the OS Data Hub and copy your Project API Key. Paste the key into the Project API Key box on the local server demo

4

Run web-based demo

There are four queries to run within the Linked Identifiers API demo application.

  • To run the first query, you need to enter a linked identifier ID into the input box and click Run query.

  • To run the second query, you need to select a feature type, enter a linked identifier ID into the input box and click Run query.

  • To run the third query, you need to select an identifier type, enter a linked identifier ID into the input box and click Run query.

  • To run the fourth query, you need to select a correlation method type and click Run query.

OS Linked Identifiers API
OS-Data-Hub-API-Demos
live-server
OS-Data-Hub-API-Demos
OS-Data-Hub-API-Demos GitHub repository
OS-Data-Hub-API-Demos GitHub repository showing Code > Download ZIP option
OSLinkedIdentifiersAPI folder in IDE project folder
OSLinkedIdentifiersAPI folder with index.html open
OS Linked Identifiers API demonstrator in browser window
OS Linked Identifiers API demonstrator with input in Project API Key field
OS Linked Identifiers API demonstrator with input in Look up ID field
OS Linked Identifiers API demonstrator with input in the Look up feature type field
OS Linked Identifiers API demonstrator with input in the Look up Id by Identifier field
OS Linked Identifiers API demonstrator with input in the Get current product version field