REST API
Records
Search

Search

Parameters

For all endpoints, the following search parameters are available:

NameDescriptionValue optionsDefault value
qThe query stringstring""
llayoutlistlist
pThe page numberpositive integer1
sThe page sizepositive integer10
sortThe sorting ordernewest, oldest, bestmatchnewest if empty query, else bestmatch

Each parameter are set with = and parameters should be separated by &.

Example:

curl -k  \
  -H "Authorization: Bearer BtMgKKIxJl838fN25PHRQtacuTJwTan0GYvDbXDB7PXoPYSHcugjZSrXQu6Y" \
  -H "Content-Type: application/json" \
  https://mbdb.test.du.cesnet.cz/api/user/records/mst/?q="example"&p=2

Published records from specific model

The endpoint is:

https://mbdb.test.du.cesnet.cz/api/records/<model>/?

Where:

  • <model> is one of bli, itc, mst, spr

Example using curl:

curl -k  \
  -H "Authorization: Bearer BtMgKKIxJl838fN25PHRQtacuTJwTan0GYvDbXDB7PXoPYSHcugjZSrXQu6Y" \
  -H "Content-Type: application/json" \
  https://mbdb.test.du.cesnet.cz/api/user/records/mst/?q="example"

Published records from all models

The endpoint is:

https://mbdb.test.du.cesnet.cz/api/search/?

Example using curl:

curl -k  \
  -H "Authorization: Bearer BtMgKKIxJl838fN25PHRQtacuTJwTan0GYvDbXDB7PXoPYSHcugjZSrXQu6Y" \
  -H "Content-Type: application/json" \
  `https://mbdb.test.du.cesnet.cz/api/search/?q="example"`

Records and drafts from specific model and specific user

The endpoint is:

https://mbdb.test.du.cesnet.cz/api/user/records/<model>/?

Note that it requires authentication to access drafts.

Where:

  • <model> is one of bli, itc, mst, spr

Example using curl:

curl \
  -H "Authorization: Bearer BtMgKKIxJl838fN25PHRQtacuTJwTan0GYvDbXDB7PXoPYSHcugjZSrXQu6Y" \
  -H "Content-Type: application/json" \
  https://mbdb.test.du.cesnet.cz/api/user/records/mst/?q="example"

All records and drafts from specific user

The endpoint is:

https://mbdb.test.du.cesnet.cz/api/user/search/?

Where:

  • <model> is one of bli, itc, mst, spr

Example using curl:

curl \
  -H "Authorization: Bearer BtMgKKIxJl838fN25PHRQtacuTJwTan0GYvDbXDB7PXoPYSHcugjZSrXQu6Y" \
  -H "Content-Type: application/json" \
  https://mbdb.test.du.cesnet.cz/api/user/search/?q="example"