searchEad

From Archives Portal Europe Wiki
Revision as of 13:25, 11 August 2016 by Admin (Talk | contribs) (Created page with " Request url: <code>https://api.archivesportaleurope.net/services/search/ead</code>. This service is a POST-request. <div><br/>__TOC__<br/></div> = Request parameters = Three...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Request url: https://api.archivesportaleurope.net/services/search/ead.

This service is a POST-request.



Request parameters

Three request parameters can be used to do a search in archival descriptions.

eg.

{
  "query": "nepal",
  "count": 5,
  "startIndex": 0,
  "filters": [
    {
      "facetFieldName": "country",
      "facetFieldIds": [
        "7"
      ]
    }
  ],
  "dateFilters": [
    {
      "dateFieldName": "fromDate",
      "dateFieldId": "1800-01-01_2"
    }
  ]
}

This example searches for archival descriptions with the term "nepal" and filters on the facet "country" with id = 7 (identifier for "NETHERLANDS") and date-facet "fromDate" with id = "1800-01-01_2" (identifier for the period 1800-1999).

query

Containing the searchterm(s). Required.

count

The resultlist is delivered in chunks of a certain size. Request parameter "count" describes the number of results that are in one chunk. Optional. Default value is 5.

startIndex

Request parameter "startIndex" enables you to select the results that you want to have. Counting starts at zero. If "count" = 5, the second chunk starts with startIndex 5, the following at startIndex 10, etc. Optional. Default value is 0.

filters

Request parameter "filters" enables you to filter the result on facets. The facets are summarized in SearchEad#facets.

dateFilters

Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarized in SearchEad#date_facets

Response parameters

The response contains a list of the descriptions where the requested search-term(s) was/were found.

eg.

{
  "totalResults": 205,
  "startIndex": 0,
  "totalPages": 41,
  "eadSearchResults": [
    {
      "id": "C4237666",
      "fondsUnitTitle": "Inventaris van de archieven van de Stichting Aids Fonds - Soa Aids Nederland, de Stichting STOP AIDS NOW! en de Stichting Werkmaatschappij Soa Aids en hun taakvoorgangers, 1914- 2008 (2011)",
      "fondsUnitId": "2.19.225",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "2002",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "Mon Dec 07 00:47:07 UTC 2015",
      "unitId": "2.19.225 - 5529",
      "unitTitle": "Nepal",
      "unitTitleWithHighlighting": "<em>Nepal</em>",
      "scopeContent": "",
      "scopeContentWithHighlighting": ""
    }
   ... skip ...
  ],
  "facetFields": {
    "country": [
      {
        "id": "7",
        "name": "NETHERLANDS",
        "frequency": 180
      },
      {
        "id": "16",
        "name": "FRANCE",
        "frequency": 25
      }
    ],
  "facetDateFields": {
      "fromDate": [
        {
          "id": "1800-01-01_2",
          "name": "1800-1999",
          "frequency": 166
        },
        {
          "id": "2000-01-01_2",
          "name": "2000-2199",
          "frequency": 2
        }
      ],
      "toDate": [
        {
          "id": "1800-01-01_2",
          "name": "1800-1999",
          "frequency": 166
        },
        {
          "id": "2000-01-01_2",
          "name": "2000-2199",
          "frequency": 2
        }
      ]
    }
}

totalResults

The response parameter "totalResults" gives the number of results.

startIndex

The response parameter "startIndex" gives the number of the chunk you requested.

totalPages

The response parameter "totalPages" gives the number of chunks.

eadSearchResults

Enumeration of the results. A result could be a holdings guide, a source guide, a finding aid, or a descriptive unit (ie. a sublevel component). They are all optional except "id".

id Internal APE identifier of the result
unitId Identifier of the result provided by the repository
unitTitle Description of the result
unitTitleWithHighlighting Description of the result, with the mark "<em>" to emphasize the search term that was used in the search request.
unitDate Date of creation of the result.
scopeContent More descriptive information about the result.
scopeContentWithHighlighting More descriptive information about the result, with the mark "<em>" to emphasize the search term that was used in the search request.
hasDigitalObject TRUE/FALSE
langMaterial Language in which the result is created.
language Language of the description of the result.
docType Type of archives describing document where the result is found : "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit".
level Type of result: "archdesc" for highest level description or "clevel" for subordinate components
fondsUnitId Identifier of the fonds provided by the repository.
fondsUnitTitle Title of the finding aid.
repository Name of the repository holding the fonds
repositoryCode Code of the repository holding the fonds. Preferably, but not necessarily ISIL.
country Name of the country where the repository is. In English.

facetFields

This respsonse parameter gives an enumeration of facets. Every facet has three variables.

id Internal APE identifier of the value. Use this "id" in the filter request parameter.
name Human readable value (in English).
frequency The number of results of this facet containing the searchterm.

facets

country Name of the country where the repository is. In English.
subject Subject that is added to the archival description
repository Name of the repository holding the fonds
docType Type of archives describing document where the result is found : "fa" for Finding Aid, "hg" for Holdings Guide or "sg" for Source Guide.
level Type of result: "archdesc" for highest level description or "clevel" for subordinate components
hasDigitalObject TRUE/FALSE
digitalObjectType Type of the Object: most of the time: IMAGE
unitDateType Type of date describing the archival unit.

date facets

With the date facets you can zoom in on the period of time. Results are grouped in periods of two centuries in the first step. If you use these groupings in the request-parameter dateFilter, you'll have new dateFacets that groups the results into groups of two decads

fromDate Grouping of the search result in starting dates.
toDate Grouping of the search result in ending dates.