Creating Metadata

Creating Metadata

Page contents:

Introduction

There are multiple metadata schemas we support that your metadata can conform to and can be submitted to our systems.

Tip

Tip

We also support additional schemas, external to HDRUK, these are listed below.

When you create your metadata and POST it to our APIs, the TRAnslation SERvice (TRASER) converts this metadata into the Gateway Data Model (GWDM) for internal storage.

  • Example: HDRUK 3.0.0GWDM 2.0

There are several schemas, each with possibly multiple versions, that we support. Metadata in each can be accepted as input, validated and translated into our GWDM.

With TRASER, it is also possible to retrieve your data in various different schemas by requesting the stored data is translated into a specific schema.

  • Example: GWDM 1.1BioSchema

The input-output combinations of schemas we support are dependant on the list of translations which are implemented. Translations are written using Transformation language JSONata. You can visit our translation files repository to see the translation maps; request new translations so your schema can be supported; report bugs in translations; or submit your own translation maps!

Supported Schemas

You can visit the repository https://hdruk.github.io/schemata/ to see a summary of our schemas and a change log between different versions.

Schemas are published as pydantic models that can be found here. These models are also exported as json-schema, for example: HDRUK/2.2.0/schema.json.

You can even use TRASER itself to confirm currently supported schemas, with something like the following examples:

import requests import json traser_uri = "https://hdr-gateway-traser-prod-5orcbz5z4q-ew.a.run.app" response = requests.get(f"{traser_uri}/list/schemas") print(json.dumps(response.json(), indent=6))
curl --location 'https://hdr-gateway-traser-prod-5orcbz5z4q-ew.a.run.app/list/schemas'
https://hdr-gateway-traser-prod-5orcbz5z4q-ew.a.run.app/list/schemas

Supported Translations

Our translation service will also allow you to see what available translations there are:

import requests import json traser_uri = "https://hdr-gateway-traser-prod-5orcbz5z4q-ew.a.run.app" response = requests.get(f"{traser_uri}/list/templates") print(json.dumps(response.json(), indent=6))
curl --location 'https://hdr-gateway-traser-prod-5orcbz5z4q-ew.a.run.app/list/templates'
https://hdr-gateway-traser-prod-5orcbz5z4q-ew.a.run.app/list/templates

All of the above, will return something similar to:

[ { "output_model": "HDRUK", "output_version": "2.1.2", "input_model": "HDRUK", "input_version": "datasetv2" }, { "output_model": "HDRUK", "output_version": "2.1.2", "input_model": "HDRUK", "input_version": "2.1.3" }, { "output_model": "HDRUK", "output_version": "2.1.2", "input_model": "HDRUK", "input_version": "2.0.2" }, { "output_model": "HDRUK", "output_version": "3.0.0", "input_model": "HDRUK", "input_version": "2.2.1" }, { "output_model": "HDRUK", "output_version": "2.1.2", "input_model": "GWDM", "input_version": "1.0" }, { "output_model": "HDRUK", "output_version": "2.1.2", "input_model": "GWDM", "input_version": "1.1" }, { "output_model": "HDRUK", "output_version": "2.1.3", "input_model": "HDRUK", "input_version": "2.1.2" }, { "output_model": "HDRUK", "output_version": "2.2.1", "input_model": "HDRUK", "input_version": "2.2.0" }, { "output_model": "HDRUK", "output_version": "2.2.1", "input_model": "GWDM", "input_version": "1.2" }, { "output_model": "HDRUK", "output_version": "2.2.0", "input_model": "HDRUK", "input_version": "2.1.2" }, { "output_model": "HDRUK", "output_version": "2.2.0", "input_model": "HDRUK", "input_version": "2.2.1" }, { "output_model": "HDRUK", "output_version": "2.2.0", "input_model": "GWDM", "input_version": "1.1" }, { "output_model": "GWDM", "output_version": "1.0", "input_model": "HDRUK", "input_version": "2.1.2" }, { "output_model": "GWDM", "output_version": "1.0", "input_model": "GWDM", "input_version": "1.1" }, { "output_model": "GWDM", "output_version": "1.0", "input_model": "SchemaOrg", "input_version": "default" }, { "output_model": "GWDM", "output_version": "1.1", "input_model": "HDRUK", "input_version": "2.1.2" }, { "output_model": "GWDM", "output_version": "1.1", "input_model": "HDRUK", "input_version": "2.2.0" }, { "output_model": "GWDM", "output_version": "1.1", "input_model": "GWDM", "input_version": "1.0" }, { "output_model": "GWDM", "output_version": "1.1", "input_model": "GWDM", "input_version": "1.2" }, { "output_model": "GWDM", "output_version": "2.0", "input_model": "GWDM", "input_version": "1.2" }, { "output_model": "GWDM", "output_version": "1.1", "input_model": "SchemaOrg", "input_version": "BioSchema" }, { "output_model": "GWDM", "output_version": "1.2", "input_model": "HDRUK", "input_version": "2.2.1" }, { "output_model": "GWDM", "output_version": "2.0", "input_model": "HDRUK", "input_version": "3.0.0" }, { "output_model": "GWDM", "output_version": "1.2", "input_model": "GWDM", "input_version": "1.1" }, { "output_model": "SchemaOrg", "output_version": "default", "input_model": "HDRUK", "input_version": "2.1.2" }, { "output_model": "SchemaOrg", "output_version": "default", "input_model": "GWDM", "input_version": "1.1" }, { "output_model": "SchemaOrg", "output_version": "BioSchema", "input_model": "GWDM", "input_version": "1.0" }, { "output_model": "SchemaOrg", "output_version": "BioSchema", "input_model": "GWDM", "input_version": "1.1" }, { "output_model": "SchemaOrg", "output_version": "GoogleRecommended", "input_model": "HDRUK", "input_version": "2.1.2" }, { "output_model": "SchemaOrg", "output_version": "GoogleRecommended", "input_model": "GWDM", "input_version": "1.0" }, { "output_model": "SchemaOrg", "output_version": "GoogleRecommended", "input_model": "GWDM", "input_version": "2.0" } ]

HDR UK v3.0.0 Template

You can use the following JSON template to create a payload that matches our HDR UK v3.0.0 schema to build an integration, or test with. Each value in the JSON template indicates the datatype that should/could be filled so that it passes the metadata validation step via TRASER (as noted previously).

Looking for labels? They can now be found in the details panel on the floating action bar.