spraakbanken / metadata-api

REST-API that serves meta data for SB's corpora and lexicons
MIT License
1 stars 1 forks source link
flask python3 rest-api

This repo contains several components:

metadata-api

Requirements

Usage

Available API calls:

Installation (SBX-specific)

Collections

A collection is a "meta" metadata entry which is used to summarize multiple resources. Collections are supplied as YAML files. The resource-IDs belonging to a collection can either be supplied as a list in the YAML (with the 'resources' key) or each resource can state which collection(s) it belongs to in its YAML (with the 'in_collections' key which holds a list of collection IDs). The size of the collection is calculated automatically. A collection may have a resource description in its YAML.

Unlisted

Resources with the attribute "unlisted": true will not be listed in the data list on the web page, but they can be accessed directly via their URL. This is used as a quick and dirty versioning system.

Successors

The successors attribute can be used for resources that have been superseded by one or more other resources (e.g. newer versions). This attribute holds a list of resource IDs.

gen_pids.py

For documentation see the code comments and the /docs directory.

Storing credentials

The Datacite login credentials are store in a .netrc file located in /home/fksbwww on the server.