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

Add database field to meta for describing the current database #424

Merged
merged 7 commits into from
Jun 17, 2023
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
22 changes: 22 additions & 0 deletions optimade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,19 @@ Every response SHOULD contain the following fields, and MUST contain at least :f

Implementation note: the functionality of this field overlaps to some degree with features provided by the HTTP error :http-error:`429 Too Many Requests` and the `Retry-After HTTP header <https://tools.ietf.org/html/rfc7231.html#section-7.1.3>`__. Implementations are suggested to provide consistent handling of request overload through both mechanisms.

- **database**: a dictionary describing the specific database accessible at this OPTIMADE API.
JPBergsma marked this conversation as resolved.
Show resolved Hide resolved
If provided, the dictionary fields SHOULD match those provided in the corresponding links entry for the database in the provider's index meta-database, outlined in `Links Endpoint JSON Response Schema`_.
The dictionary can contain the OPTIONAL fields:
vaitkus marked this conversation as resolved.
Show resolved Hide resolved

- **id**: the identifier of this database within those served by this provider, i.e., the ID under which this database is served in this provider's index meta-database.
- **name**: a human-readable name for the database, e.g., for use in clients.
ml-evs marked this conversation as resolved.
Show resolved Hide resolved
- **version**: a string describing the version of the database.
- **description**: a human-readable description of the database, e.g., for use in clients.
- **homepage**: a `JSON API link <http://jsonapi.org/format/1.0/#document-links>`__, pointing to a homepage for the particular database.
- **maintainer**: a dictionary providing details about the maintainer of the database, which MUST contain the single field:
JPBergsma marked this conversation as resolved.
Show resolved Hide resolved

- **email** with the maintainer's email address.

- **implementation**: a dictionary describing the server implementation, containing the OPTIONAL fields:

- **name**: name of the implementation.
Expand Down Expand Up @@ -709,6 +722,15 @@ Every response SHOULD contain the following fields, and MUST contain at least :f
"email": "admin@example.com"
},
"issue_tracker": "http://tracker.example.com/exmpl-optimade"
},
"database": {
ml-evs marked this conversation as resolved.
Show resolved Hide resolved
"id": "example_db",
"name": "Example database 1 (of many)",
"description": "The first example database in a series hosted by the Example Provider.",
"homepage": "http://database_one.example.com",
"maintainer": {
"email": "science_lead@example.com"
}
}
}
// ...
Expand Down