API calls

Explore the API here. Need a little help? Read our API basics to learn more.

ServerURL: https://gsafinearts.pbs.gsa.gov

Template: Artist Index

Information required:
● Index (Letter of alphabet)
● Artist Last Name
● Artist First Name
● Artist ID (used to create link to Artist Overview page)

Sample API calls for this page
[ServerURL]/emuseum/api/search/people?Index=a&end=25
[ServerURL]/emuseum/api/search/people?Index=a&start=25&end=50



Template: Artist Overview

Information required:
● Artist First, Last
● Birth / Death Dates (displayDate)
● Biographical Info (see note below)
● List of Objects by the artist, each item to include:
    ○ Object ID (used to create link to Art Detail page)
    ○ Object Number
    ○ Primary Image Filename
    ○ Title of Artwork
    ○ Classification
    ○ Display Date

Sample API calls:
[ServerURL]/emuseum/api/id/people/5616
[ServerURL]/emuseum/api/id/people/2333
[ServerURL]/emuseum/api/id/people/1862



Template: Artwork Detail

Information required:
● Title
● Artist (first & last)
● Artist ID (used to create link to artist page)
● Year
● Medium
● Classification
● Object Number
● Dimensions
● Credit Line
● Copyright
● Primary image filename
● Location (Building Name, Building Address)
● Building ID (used to create link to building page)
● Description (expected textType=interpretation, see note below) (ObjTextEntries)
● If there are additional images of this object, then a list of them is included (ObjMedia).
Elements included that will be used are:
    ○ Non-Primary Filenames
    ○ Object ID
● If there are additional objects by this Artist, then a list of them is included (artistRelatedObjects). Elements included that will be used are:
    ○ Primary Image Filenames
    ○ Object ID (used to create link to the Artwork Detail page for that object)
● If the object is in a collection, then collection information is included:
    ○ Collection ID (used to link to collection)
    ○ Collection Name
    ○ List of objects in the Collection including:
        - Primary Image Filename
        - Object ID (to create links to the Artwork Detail pages of these Objects)

Sample API calls
[ServerURL]/emuseum/api/id/objects/23671
[ServerURL]/emuseum/api/id/objects/1111
[ServerURL]/emuseum/api/id/objects/22688



Template: Collection Index

Information required:
● Collection Title
● Short Collection Description
● Primary image filename for each Collection
● Collection ID (to create link to individual collections page)
Sample API call
[ServerURL]/emuseum/api/collections/all

Template: Individual Collection

Information required:
● Long Description of Collection
● Title of Collection
● Listing of artwork in the collection, each including:
    ○ Title
    ○ Artist Name (not Artist Last, First)
    ○ Display Year
    ○ Primary Image Filename
    ○ Classification
    ○ Object Number
    ○ Object ID (to create link to Artwork Detail)

Sample API call
[ServerURL]/emuseum/api/collections/285



Template: Browse by Location/State

Information required:
● State Name
● List of all federal and non-federal buildings that house GSA artwork in a particular State
    ○ Building Name
    ○ Building ID (to create link to next page)
    ○ City

Sample API calls
[ServerURL]/emuseum/api/search/buildings?State=IL
[ServerURL]/emuseum/api/search/buildings?State=DC



Template: Building Overview

Information required:
● Building Name
● Building Address
● Primary Building Image Filename (Fed buildings only - expect to have these added by launch)
● List of Objects found at the building location, each item to include (SiteObjects)
    ○ Object ID (used to create link to Art Detail page)
    ○ Object Number
    ○ Primary Image Filename
    ○ Title of Artwork
    ○ Classification
    ○ Display Date

Sample API calls
[ServerURL]/emuseum/api/id/buildings/538
[ServerURL]/emuseum/api/id/buildings/988



Template: Search Results for Artists

Information required in results:
● Artist ID (used to create link to Artists Overview page)
● Artist Name
● Dates (for Keyword Search)

Sample API calls
[ServerURL]/emuseum/api/search/people?keyword=Robert
[ServerURL]/emuseum/api/search/people?keyword=Robert&end=1000
[ServerURL]/emuseum/api/search/people?Last%20Name=Robert
[ServerURL]/emuseum/api/search/people?First%20Name=Robert
[ServerURL]/emuseum/api/search/people?displayName=Robert
[ServerURL]/emuseum/api/search/people?keyword=Robert&start=5&end=10



Template: Search Results for Objects

Multiple search fields allow visitors to focus a “Search for Artwork” with query terms input into separate fields for “By Artist”, “Keywords in Title”, and “Keywords in Artwork Information.” A checkbox allows results to be filtered to those with “Images Only.” When multiple terms are input, the system should first return results where all conditions apply (“AND”) followed by results where one or another apply (“OR”).

Information required in results:
● Object ID (used to create link to Artwork detail page)
● Title
● Object Number
● Artist ID (used to create link to Artists Overview page)
● Artist Name (first, last)
● Primary image filename
● Display Date
● Classification

API Calls Tested:
[ServerURL]/emuseum/api/search/objects?Title=Farm (133 results)
[ServerURL]/emuseum/api/search/objects?keyword=Farm (98 results)
[ServerURL]/emuseum/api/search/objects?Title=Farm&end=200&start=100
[ServerURL]/emuseum/api/search/objects?keyword=calder
[ServerURL]/emuseum/api/search/objects?keyword=robert&end=1000
[ServerURL]/emuseum/api/search/objects?keyword=robertson&end=1000



Template: Search Results for Locations

A single search field allows visitors to “Search for Locations.”

Information required in results:
● Building ID (used to create link to Building page)
● Building Name
● City
● State

Sample API Calls:
[ServerURL]/emuseum/api/search/buildings?keyword=california
[ServerURL]/emuseum/api/search/buildings?keyword=diego
[ServerURL]/emuseum/api/search/buildings?keyword=Kluczynski



Template: Search Results for Classification

Links allow visitors to browse the complete set of results for Drawings, Paintings, Prints, or Sculptures

Information required in results:
● Object ID (used to create link to Artwork detail page)
● Title
● Object Number
● Artist ID (used to create link to Artists Overview page)
● Artist Name (first, last)
● Primary image filename
● Display Date
● Classification

Sample API Calls:
[ServerURL]/emuseum/api/search/objects?Classification=painting
[ServerURL]/emuseum/api/search/objects?Classification=print&end=200



Template: Search Results for Classification

Links allow visitors to browse the complete set of results for Drawings, Paintings, Prints, or Sculptures

Information required in results:
● Object ID (used to create link to Artwork detail page)
● Title
● Object Number
● Artist ID (used to create link to Artists Overview page)
● Artist Name (first, last)
● Primary image filename
● Display Date
● Classification

Sample API Calls:
[ServerURL]/emuseum/api/search/objects?Classification=painting
[ServerURL]/emuseum/api/search/objects?Classification=print&end=200