Custom Catalogue APIs

This article provides a summary of the FAIR API endpoints that are used to create and manage custom catalogue templates. For full documentation please see the FAIR Swagger docs

Users need to be granted permission to edit catalogue templates. These are applied to the user's access token.

This page details how users can obtain an access token to query the API.

Permissions

Admin users can add further permissions to a user's access token by selecting API Tokens from the Administer menu, and then selecting the token they wish to add permissions to.

The permissions for editing catalogue templates are:

  • The token can create catalogue definitions for use in datasets
  • The token can view all catalogue definitions
  • The token can modify which catalogue fields will be used when creating datasets
  • The token can delete catalogue definitions

API Endpoints

The following endpoints can be used to return existing catalogue templates:

API EndpointDescription
GET /catalogues/{code}/templateReturns the catalogue template of the catalogue with the specified 'code'
GET /datasets/{code}/catalogue/templateReturns the catalogue template of the dataset with the specified 'code'
GET /templates/catalogues/ Lists all available catalogue templates
GET /templates/catalogues/{code}Get a specific catalogue definiton with the 'code'

The following endpoint can be used to validate a catalogue pay load against an existing template:

API EndpointDescription
PUT/templates/catalogues/{code}/schemaAllows user to validate catalogue payload against an existing catalogue template

The following endpoints are used to create, edit and delete catalogue templates:

API EndpointDescription
POST templates/cataloguesUsed to post a new catalogue template
PUT templates/catalogues/{code}Used to make updates to the catalogue template with the specified 'code'
DELETE templates/catalogues/{code}Used to delete the catalogue template with the specified 'code'

The following endpoints can be used to manage the default catalogue template within a hub

API EndpointDescription
GET/configurations/default-catalogue-definitionReturns the current default catalogue template
PUT/configurations/default-catalogue-definitionUsed to set the default catalogue template
Updated on March 4, 2024

Was this article helpful?