"

Document Objects

Base Url

https://api.amdigital.co.uk/1.0/[resource_name]/documents

Where [resource_name] is the key of the Adam Matthew collection you are using. For a list of collection keys available click here.

Description

Documents represent logical whole entities of pages or images such as books, manuscripts or magazines. Full text data is only returned when requesting a specific single document by its 'id' and never when requesting multiple documents by searching to increase performance.

Query String Parameters

Get Operation

 id

The API identifier assigned to the document.

Data Type: String

Example: https://api.amdigital.co.uk/1.0/globalcommodities/documents?id=G362_876_B847_B876

query

Text to search for. This parameter will be parsed as Contextual Query Language (CQL) to allow for more powerful searching.

Data Type: String

Example: https://api.amdigital.co.uk/1.0/globalcommodities/documents?query=dinosaur%20or%20bird

take

Number of records to return. This defaults to 10 with a maximum value of 200. If you would like to return more records use this in multiple calls in conjunction with skip.

Data Type: Integer

Values: to 200

Default: 10

Example: https://api.amdigital.co.uk/1.0/globalcommodities/documents?take=25

skip

The record number to start at from the list of results. A search query returns results in order of relevance. If the results returned from a query do not return what you are looking for you can use this parameter to return records further down the list. The default for this value is 0 with a maximum of the number of records in the collection. If you go over this number no records will be returned.

Data Type: Integer

Values: to 2147483647

Default: 0

Example: https://api.amdigital.co.uk/1.0/globalcommodities/documents?skip=200

Example Response

{
  "timestamp": "11/12/2015 12:31:54",
  "version": "1.0",
  "totalResults": 10,
  "data": [
    {
      "type": "document",
      "collection": "Mass Observation",
      "identifier": "WorktownCollection-Box 9",
      "uri": "http://www.massobservation.amdigital.co.uk/Documents/Details/WorktownCollection-Box 9",
      "metadata": {
        "title": "MUNICIPAL POLITICS",
        "documentType": "Worktown Collection",
        "reference": "Box 9",
        "source": "University of Sussex",
        "rights": "Mass Observation Archive. University of Sussex Special Collections",
        "fullText": "false"
      }
    }]
}