You are on page 1of 8

eMuseum 5 API

1
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
Contents
Introduction..................................................................................................... 3
General.......................................................................................................... 3
Module Formats ............................................................................................ 3
General Parameter Summary: ............................................................................ 3
General Parameters ....................................................................................... 3
Keyword Search................................................................................................. 5
Search Parameter Summary: .............................................................................. 5
Search Parameters......................................................................................... 5
Advanced Search................................................................................................ 6
Advanced Search Parameter Summary: .................................................................. 6
Advanced Search Parameters: ............................................................................ 6
Result Modifiers ................................................................................................. 7
Result Modifier Parameter Summary: .................................................................... 7
Result Modifiers ............................................................................................ 7

2
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
Introduction
This document outlines general URL patterns for retrieving results through eMuseum 5’s API.
Please see the "General" section for standard patterns and each modules section for more detailed
examples of API requests and returned data.

This documentation does not take into account customizations and only outlines default field
configurations. APIs are only available with an elevated eMuseum API license key.

General
This section outlines general module, search and advanced search patterns to retrieve records in
all available views and API formats. You will also find modifier parameters that can be applied to
most URLs, such as filters and paging.

Module Formats
General module URL patterns for viewing results by module, related module, in specific views and API
formats.

General Parameter Summary:


URL ELEMENT REQUIRED DESCRIPTION
{module} Yes The module to list records from.
{view} No - defaults to configuration The view to display records in.
{id} No The unique ID of a single record, if only a
single record should be returned.
{slug} No The title or name of the single record.
Not required in most cases.
{related-module} No The module that should be used to display
related records to the given {module}.
Not available for all modules.
{api-format} No The preconfigured API format that the
data should be returned in. Default
formats are JSON, XML and RDF.

General Parameters
Whether viewing records or retrieving data through the API, all URLs in eMuseum that are not groups
(collections, categories, etc.) require a module parameter. After a module is provided, you can limit
what is displayed or returned, and how it’s displayed or what format it’s returned in, by adding and
changing the URL parameters.

3
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
URL parameter descriptions and examples:

/{module}

Example: http://<emuseum-site-url>/objects

Lists all records of the given {module}, objects in this case. The module is the minimum required
element for module, search and advanced search results.

/{module}/{view}

Example: http://<emuseum-site-url>/objects/images

Lists all records of the given {module}, objects, in the given {view}, images. The {view} parameter
is not requires, so if none is specified, results will be returned in the default view set in the
appearance configuration. Some result modifiers such as filters and sorting require this to be set.
If these actions are taken through the UI, the view will automatically be set. If these actions are
done programmatically, they will need to be added in. This is explained in more detail in the page
modifiers section.

/{module}/{id}/{slug}
Example: http://<emuseum-site-url>/objects/2/title

Displays a single record with required record {id} and optional record {slug} from the given
{module}. In the case of objects and exhibitions, the {slug} is the title. For constituents (people),
the {slug} is the display name by default. The {slug} optional and can be removed from the URL,
still allowing the user to access the record.

/{module}/{id}/{slug}/{related-module}
Example: http://<emuseum-site-url>/exhibitions/2/title/objects
Displays {related-module} records related to the given {module}, in the example above, it would
display all objects related to exhibition with {id} 2.

/{module}/{api-format}

Example: http://<emuseum-site-url>/objects/json
Lists all records of the given {module} in the given {api-format}. The number of records displayed
is based on the number set in the appearance configuration, and additional records can be
retrieved through the ?page modifier, explained more in the page modifiers section.

/{module}/{id}/{api-format}

Example: http://<emuseum-site-url>/objects/2/json

4
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
Displays a single record with required record {id} in the given {api-format}.

/{module}/{id}/{related-module}/{api-format}

Example: http://<emuseum-site-url>/exhibitions/2/objects/json

Displays {related-module} records related to the given {module} in the given {api-format}

Keyword Search
Search Parameter Summary:
URL ELEMENT REQUIRED DESCRIPTION
/search Yes The base of the keyword search.
{keyword} No - defaults to "*" The word(s) to be used for the keyword
search.
{module} No - returns all modules The module to query records from.
{view} No - defaults to configuration The view to display queried records in.
{api-format} No The preconfigured API format that the
data should be returned in.

Search Parameters
URL parameter descriptions and examples:

/search

Example: http://<emuseum-site-url>/search

The base of the Keyword search. If no other parameters are given, returns all records from all modules.

/search/{keyword}

Example: http://<emuseum-site-url>/search/chairs

Searches all modules for the given {keyword}.

/search/{keyword}/{module}

Example: http://<emuseum-site-url>/search/chairs/objects

Searches the given {module} for the given {keyword}.

/search/{keyword}/{module}/{view}

Example: http://<emuseum-site-url>/search/chairs/objects/list

5
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
Searches the given {module} for the given {keyword} and displays the records in the given {view}. If no
view is passed, the results will display in the default view set in the appearance configuration.

/search/{keyword}/{module}/{api-format}

Example: http://<emuseum-site-url>

Searches the given {module} for the given {keyword} and displays the records in the given {api-format}.

Advanced Search
Advanced Search Parameter Summary:
URL ELEMENT REQUIRED DESCRIPTION
/advancedsearch Yes The base of the advanced search.
{module} Yes The module to search in.
{field} Yes The field to search on.
{field-value} Yes The value to search a given field with
{view} No - defaults to configuration The view to display queried records in.
{api-format} No The preconfigured API format that the
data should be returned in.

Advanced Search Parameters:


/advancedsearch

Example: http://<emuseum-site-url>/advancedsearch/

The base of the Advanced Search. If no other parameters are given, the advanced search page directed
to the default module (objects) advanced search form.

/advancedsearch/{module}/{field}:{field-value}

Example: http://<emuseum-site-url>/advancedsearch/objects/title:chairs

Searches the given {module} for {field-value} in the given {field}.

/advancedsearch/{module}/{field}:{field-value}%20{field2}:{field-value2}

Example: http://<emuseum-site-url>/advancedsearch/objects/title:chairs&department:design

Searches the given {module} for {field-value} in the given {field} and {field-value2} in the {field2}.

/advancedsearch/{module}/{field}:{field-value}/{view}

6
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
Example: http://<emuseum-site-url>/advancedsearch/objects/title:chairs/list

Searches the given {module} for {field-value} in the given {field} and displays the records in the given
{view}. If no view is passed, the results will display in the default view set in the appearance
configuration.

/advancedsearch/{module}/{field}:{field-value}/{api-format}

Example: http://<emuseum-site-url>/advancedsearch/objects/title:chairs/json
Searches the given {module} for {field-value} in the given {field} and returns the results in the given
{api-format}.

Result Modifiers
All result modifiers in eMuseum are passed as GET parameters at the end of the URL.

Result Modifier Parameter Summary:


URL ELEMENT REQUIRED
?filter No
?page No
?sort No
?key When key is required in configuration

Result Modifiers
As previously stated, result modifiers require that the view (or API format if retrieving data in that
way) already be defined in the URL. If the sort, filter or paging action is taken through the UI, the view
will automatically be added, if the URL is being constructed programmatically, the view must be
added.

?filter

Filters criteria require defined filter fields and field values, separated by a colon (:):

?filter/{filter-field}:{filter-field-value}

Multiple values from the same field can be defined using a comma (,) between the field values:

?filter/{filter-field}:{field-value},{field-value}

Multiple filter fields should be separated by a semi colon (;):

?filter/{filter-field}:{field-value};{filter-field2}:{field-value2}

Examples:

7
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com
Filtering objects by one value:

/search/chairs/objects?filter=classifications:Furniture

Filtering objects by multiple values:

search/chairs/objects?filter=classifications:Furniture;department:American Art

?page

The ?page modifier is not required by default, the number of initial results returned is set in the
appearance configuration. Upon using the pager of filters in the UI, the ?page modifier will be injected
into the URL.

Example:

search/silver/objects/images?page=2

?sort

Like ?page, ?sort is not required and will use the sort field set in the configuration by default. Using the
sort dropdown in the UI will inject the sort value into the URL.

Example:

search/silver/objects/images?sort=title-asc

?key

The ?key modifier is only required for retrieving data through the API, and only when the “Key
Required” configuration option is enabled. Those trying to access data through the API will need to
know their key.

Example:

/search/silver/objects/json?key=0b1cfecebc03fca8d9875555baf52a37fb272f87a177a7efdc314877af896c
e4

8
5 Hanover Squar e, Suite 1900 | New Yor k, NY 10004 | T: 212.273.1131 | F: 646.733.2239 | www.galler ysystems.com