Help us to make LAARC catalogue better!


We would like to hear your views about how the LAARC Online Catalogue can be improved. Please click the 'Leave Feedback' link below - you will be redirected to a survey page with background information about the LAARC Online Catalogue redevelopment project. Your feedback is greatly appreciated.
   Leave Feedback
   No, Thank You

Overview

Response Structure

In this version of LAARC Catalogue Search API the response format is an xml document. In the future we may offer other response formats such as json, html, csv or name=value strings.

The root of the response is a SearchResult element.

The summary of the SearchResult members is given on the left panel of this page.

There are 2 outcomes of any search operation:

  • Positive, i.e. the data was found and returned to the client
  • Negative, i.e. the data for some reason was not returned to the client

If the outcome of the search is negative, an Error element of the SearchResult would contain the details as well as the attribute Success of the root element SearchResult will be set to false.

If the outcome is positive the Success attribute will be set to true, the Error element will be empty and the element ResultSet will contain data.

The child elements of the ResultSet correspond to the list of domain objects.

The type of listed domain objects is indicated by the ResultSetType attribute of the root element SearchResult. The sub-elements of each domain object element are the properties of that domain object. They roughly correspond to the database table fields. The ID fields and unique codes by which the object can be uniquely identified in most cases are presented as attributes rather then sub-elements. The important relationship identifiers (e.g. foreign keys) are also presented as attributes.

The search criteria, i.e. the query parameters given in the URL query string, are translated into 3 objects - SearchCriteria, DisplayCriteria and ResultPager.

Each of these objects lists the criteria as element attributes.

The element has no attributes if no criteria is defined for a respective criteria object. They are included in the response for the client’s convenience to match the search request with the data returned in the response.

SearchResult

Summary

The root of the xml document returned in the response. See members of the SearchResult in the left panel of this page.

Search Result has 2 attributes Success and ResultSetType.

SearchResult :: Success

Summary

An attribute of the root element of the xml document returned in the response.

Indicates if the outcome of the search operation was successful or not. The value false indicates a negative outcome, true indicates positive outcome. If Success is set to false check the contents of Error element for the details of the search operation failure.

SearchResult :: ResultSetType

Summary

Indicates the type of the domain objects listed as children of the ResultSet element. These types are given in the left panel of this page under ResultSet .

SearchResult :: SearchCriteria

Summary

Search query parameters are put together as attributes of SearchCriteria element. Currently SearchCriteria element has no child nodes.

SearchResult :: DisplayCriteria

Summary

DisplayCriteria contains information about the display of the output. A preferred display of the output may be passed as request parameters. Alternatively DisplayCriteria may indicate variations in the display of the results. Currently there are neither variations in the output display nor there are request parameters that specify an alternative output.

This element is empty and is reserved for the future use.

SearchResult :: ResultPager

Summary

All queries that return a list of results are paged. ResultPager contains the details of how the application treated the pageno and perpage parameters.

See Introduction to the Request section

SearchResult :: Error

Summary

The content of Error element is set when the outcome of the search operation is negative. If Error element is non-empty the attribute of the SearchResult xml document root element is also set to false.

Error child elements

  • ErrorCode
  • ErrorType
  • Message

Types of errors

Error is returned in all cases when search query could not produce a valid RsultSet including the case when no results were found.

Other common cases of error are invalid request parameters.

As the Laarc Catalogue Search API is in its absolute infancy some errors may relate to application bugs, which are indicated by Bug and Unknown error types.

If you get a Bug related error, please do send us an email.

Here is an example of an Error resulting from bad query parameters

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=XXX

SearchResult :: ResultSet

Summary

ResultSet is the container element for results.

Even if an API method is designed to return a single result, this single result is enclosed in the ResultSet .

Child elements of the ResultSet are the domain objects listed in order of their retrieval from the data sources.

The types of the domain objects enclosed in the ResultSet are given on the left panel of this page.

The attribute ResultSetType of the root of the xml document tells us about the type of the domain object being listed in the ResultSet (as in Generics).

SearchResult :: ResultSet :: Site

Summary

Site element refers to basic archaeological site record. The type Site corresponds to the domain object type and is the root of the data record.

Element Site has many child elements which correspond to data fields and object properties. Attributes of the Site element include id and Sitecode the two unique identifiers of a site record.

Search operations that return a list of Site records

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=SearchSites&search_type=keywords&terms=knife,Roman&pageno=1&perpage=10

SearchResult :: ResultSet :: SiteInfo

Summary

SiteInfo extends the Site type. This is indicated by the node’s attribute Extends. SiteInfo includes the basic Site record as its child.

It also includes the site Archive record and some other related information.

The attributes RegFinds, BulkFinds, Publications tell us

  • number of related registered finds
  • number of related bulk finds
  • number of related publications

Search operations that return SiteInfo record

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=GetSite&search_type=bycode&terms=ABM97

SearchResult :: ResultSet :: Archive

Summary

Archive type shows the contents of the deposited archive that relates to an archaeological site. Archive is uniquely identified by Sitecode given as an attribute of the Archive element. The attribute isDeposited has value true if there is a digitised bundle that can be downloaded as a zip file.

The url of the zip bundle is then given in RepositoryUrl element. Othervise repositoryUrl element is empty.

The contents of an Archive is grouped by Categories and Groups of Components.

Each Component is a bundle of archive records.

Search operations that return Archive record

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=GetSiteArchive&search_type=bycode&terms=ABM97

SearchResult :: ResultSet :: MolObject

Summary

MolObject is the base type for all types of archaeological objects, namely registered and bulk finds.

The codes that uniquely identify objects are id and ObjectCode.

Objects relate to sites by a SiteId or a Sitecode.

id and SiteId are listed as attributes. Sitecode and ObjectCode – as elements.

ObjectCode for MOLA objects has an awkward format and thus is enclosed in CDATA section.

Search operations that return MolObject

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=GetAllFinds&search_type=bycode&terms=85BHS90&pageno=2&perpage=3

SearchResult :: ResultSet :: RegFind

Summary

RegFind extends MolObject . Attribute Extends of the root node indicates this fact. It is much like MolObject with addition of few more elements such as Context, FindId and IdEndPart.

Search operations that return RegFind

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=GetRegFinds&search_type=bycode&terms=85BHS90&pageno=2&perpage=3

SearchResult :: ResultSet :: BulkFind

Summary

BulkFind type extends MolObject . Attribute Extends of the root node indicates this fact. It is much like MolObject with addition of few more elements such as Context, FindId and IdEndPart.

Search operations that return BulkFind

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=GetBulkFinds&search_type=bycode&terms=85BHS90&pageno=2&perpage=3

SearchResult :: ResultSet :: Publication

Summary

Search API searches only publications that relate to archaeological sites whose records are archived in LAARC.

Search operations that return Publication

Example

http://www.museumoflondon.org.uk/laarcWS/v1/rest?op=GetPubs&search_type=bycode&terms=BIG82&pageno=2&perpage=5

 

Museum of London Home | About the Group | Contact us | News | Support us | Venue hire & services | Jobs | Site map

Mortimer Wheeler House, 46 Eagle Wharf Road, London N1 7ED. Tel: +44 (0)20 7490 8447, fax: +44 (0)20 7490 5047. Email laarc@museumoflondon.org.uk.
The development of the LAARC information systems has been supported by the Museum of London, Heritage Lottery Fund and Getty Grant Program