FOXDEN Logo FOXDEN

FAIR Open-Science Extensible Data Exchange Network

Meta Data service

FOXDEN Meta Data service is responsible for handling meta-data records. The meta-data records are stored based on pre-defined schema file. An example of schema files you can find here.

Here the main APIs:

Examples of using meta-data service APIs

# record.json can be one of CHESS meta-data records

# inject new record
curl -v -X POST -H "Content-type: application/json" \
    -H "Authorization: Bearer $token" \
    -d@./record.json \
    http://localhost:8300

# perform search with pagination
curl -X POST \
    -H "Authorization: bearer $token" \
    -H "Content-type: application/json" \
    -d '{"client":"go-client","service_query":{"query":"{}","spec":null,"sql":"","idx":0,"limit":2}}' \
    http://localhost:8300/search

# retrieve concrete record with did=123456789
curl -H "Accept: application/json" \
    -H "Authorization: bearer $token" \
    http://localhost:8300/123456789

Backends

The Metadata services supports setup of different backends:

# In MongoDB it is desired to create individual indexes
# to speed up data look-up.

# if your database is called foxden.meta, then setup your indexes as following:
# Step 1: login to your MongoDB

# Step 2: use your desired database, e.g. foxden
mongo > use foxden

# Step 3: create necessary indexes

# index on did should be unique
foxden> db.meta.createIndex({did:1}, {unique: true})

# index on doi is not unique as we may have records with no DOI
foxden> db.meta.createIndex({doi:1})

# verify your indexes
foxden> db.meta.getIndexes()