Skip to content

Latest commit

 

History

History
162 lines (139 loc) · 5.23 KB

README.md

File metadata and controls

162 lines (139 loc) · 5.23 KB

Guggenheim Collections API Specification

Base URL

All URLs references in this documentation have the base

http://api.guggenheim.org/collections/

Making Requests

All requests are made over HTTP. Authentication (by access key) is required and the client must explicitly accept the application/vnd.guggenheim.collection+json content-type.

All responses are JSON.

Only GET requests are accepted, any other kind of request will result in a 405 Method Not Allowed error.

Authentication

The Guggenheim Collections API requires an access key. You key can provided either via a header (X-GUGGENHEIM-API-KEY)or as a query parameter (key). For example, using curl, the header method would look like:

NOTE: this code on it's own will retrun a 406 error message. Include the Content Type specified below for a successful response.

curl -H "X-GUGGENHEIM-API-KEY: [YOUR_KEY]" http://api.guggenheim.org/collections/

using a query parameter:

NOTE: this code on it's own will retrun a 406 error message. Include the Content Type specified below for a successful response.

curl http://api.guggenheim.org/collections/?key=[YOUR_KEY]

The two are equivalent. The header method is preferred. A missing or invalid key will result in a 401 Unauthorized error

Content Type

All responses are JSON, in the application/vnd.guggenheim.collection+json media type. Clients must explicitly accept this media type by sending the appropriate Accept header. In curl:

curl -H "Accept: application/vnd.guggenheim.collection+json" \
    -H "X-GUGGENHEIM-API-KEY: [YOUR_KEY]" http://api.guggenheim.org/collections/

A missing or incorrect Accept header will result in a 406 Not Acceptable error.

Endpoints

Endpoint Description
/ Index of available resources
/acquisitions List of acquisitions
/acquisitions/{id} Retrieve acquisition with corresponding `id`
/bibliographies List of bibliographies
/bibliographies/{id} Retrieve bibliographies with corresponding `id`
/exhibitions List of exhibitions
/exhibitions/{id} Retrieve exhibition with corresponding `id`
/movements List of movements
/movements/{id} Retrieve movement with corresponding `id`
/objects Index of object links
/objects/{id} Retrieve object with corresponding `id`
/sites List of sites
/sites/{id} Retrieve site with corresponding `id`
/quicksearch Search for artworks by `title`, `acuisition #` or `artist name`.

Objects

Object Description
Acquisition An acquisition (a group within the collection) with the objects it contains
Constituent Constituents, that is, artists
Dates Dates and date ranges
Object A Collection Object
Site Museum site, with associated Objects
Sites A collection of Site objects
Titles A collection of Title objects
Title Title of an Object