REST API
The core course and investigator data are available through a read-only REST API, at https://amphora.asu.edu/mbl-data/rest/. As of this writing no authentication is required to access the API, but throttling limits are imposed to prevent excessive use. If you need to perform an intensive operation on the dataset (e.g. clone a large part of the dataset), please contact Erick (erick.peirson@asu.edu) ahead of time. Excessive use of the API without prior authorization may result in a temporary or permanent ban on your IP block, depending on how unhappy it makes us.
The API is subject to change; please check back for updates. We have attempted to ensure that the API is fully discoverable to mitigate any breakage in client code.
The API exposes five main resource types:
Resources
GET /mbl-data/rest/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"coursegroups": "https://amphora.asu.edu/mbl-data/rest/coursegroups/",
"courses": "https://amphora.asu.edu/mbl-data/rest/courses/",
"people": "https://amphora.asu.edu/mbl-data/rest/people/",
"institutions": "https://amphora.asu.edu/mbl-data/rest/institutions/",
"locations": "https://amphora.asu.edu/mbl-data/rest/locations/"
}
Pagination and ordering
List views (e.g. https://amphora.asu.edu/mbl-data/rest/coursegroups/) provide limit-offset pagination. Use limit to specify the maximum number of records to return, and offset to indicate the index of the record on which to start. Use the o parameter to specify record ordering. All list views should accept: name, -name, last_updated, and -last_updated.
GET /mbl-data/rest/coursegroups/?name=&occurred_from=&occurred_through=&last_updated=&o=-last_updated
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"count": 121,
"next": "https://amphora.asu.edu/mbl-data/rest/coursegroups/?last_updated=&limit=20&name=&o=-last_updated&occurred_from=&occurred_through=&offset=20",
"previous": null,
"results": [
{
"id": 2,
"name": "Research Program In History Of Biology",
"url": "https://amphora.asu.edu/mbl-data/rest/coursegroups/2/",
"number_of_courses": 1,
"last_updated": "2017-05-11T18:59:42.253254Z",
"validated": false,
"validated_by": null,
"validated_on": null
},
{
"id": 3,
"name": "Optimal Microscopy And Photomicrography In The Biomedical Sciences",
"url": "https://amphora.asu.edu/mbl-data/rest/coursegroups/3/",
"number_of_courses": 2,
"last_updated": "2017-05-11T18:59:42.253254Z",
"validated": false,
"validated_by": null,
"validated_on": null
},
...
{
"id": 1,
"name": "Botanical Museum Development",
"url": "https://amphora.asu.edu/mbl-data/rest/coursegroups/1/",
"number_of_courses": 4,
"last_updated": "2017-05-11T18:59:42.253254Z",
"validated": false,
"validated_by": null,
"validated_on": null
}
]
}
Filtering
The following filter parameters are available on all of the list views:
- name (string): matches any record whose name contains the value of this parameter (case insensitive). For Person records, this works on the concatenation of the first_name and last_name fields.
- last_updated (datetime): matches any record updated on or after the value of this parameter.
Some resource types provide additional parameters.
Common fields
The following fields are present on all of the records exposed by the API.
- id (integer): the primary identifier for the record.
- name (string): the freeform name of the record. For institutions this will be the name of the institution. For locations, this will be the freeform value as it appeared in the course attendance records (e.g. a complete address).
- url (url): the location of the data resource in the API.
- last_updated (datetime): the date and time at which the record was last updated.
- validated (boolean): indicates whether or not a human curator has inspected the record for completeness and accuracy.
- validated_by (string or null): the username of the curator who validated the record.
- validated_on (datetime or null): the date and time when the record was validated.
Many records will also provide an authority field, which will be null or a data object.