Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document API calls #19

Merged
merged 3 commits into from
Feb 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 249 additions & 1 deletion doc/api-calls.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,250 @@
# The search API calls

## General remarks

* In a first approach, we define an API without authentication. As a
consequence, this API will be constraint to the read only access to
public data. Later on, we will add authentication to allow also
access to embargoed data and may also consider to allow the creation
of new datasets.

---

## Dataset

### Get metadata

Get extended metadata for a dataset.

#### Call

`GET /datasets/{id}/metadata`

#### Path parameters

id
: the id of the dataset

#### Query parameters

TBD

#### Returns

TBD

---

### Get dataset

Get a single dataset.

#### Call

`GET /datasets/{id}`

#### Path parameters

id
: the id of the dataset

#### Returns

The dataset

---

### Search datasets

Search for datasets.

#### Call

`GET /datasets`

#### Query parameters

filter
: a query

#### Returns

A list of datasets.

---

## Document

### Count documents

Get the number of documents.

#### Call

`GET /documents/count`

#### Query parameters

where
: a query

#### Returns

A number

---

### Get document

Get a single document.

#### Call

`GET /documents/{id}`

#### Path parameters

id
: the id of the document

#### Returns

The document

---

### Search documents

Search for documents.

#### Call

`GET /documents`

#### Query parameters

filter
: a query

#### Returns

A list of documents.

---

## Instrument

### Count instruments

Get the number of instruments.

#### Call

`GET /instruments/count`

#### Query parameters

where
: a query

#### Returns

A number

---

### Get instrument

Get a single instrument.

#### Call

`GET /instruments/{id}`

#### Path parameters

id
: the id of the instrument

#### Returns

The instrument

---

### Search instruments

Search for instruments.

#### Call

`GET /instruments`

#### Query parameters

filter
: a query

#### Returns

A list of instruments.

---

## Sample

### Count samples

Get the number of samples.

#### Call

`GET /samples/count`

#### Query parameters

where
: a query

#### Returns

A number

---

### Get sample

Get a single sample.

#### Call

`GET /samples/{id}`

#### Path parameters

id
: the id of the sample

#### Returns

The sample

---

### Search samples

Search for samples.

#### Call

`GET /samples`

#### Query parameters

filter
: a query

#### Returns

A list of samples.

[comment]: # document the API calls with their parameters and return values