searchEad

From Archives Portal Europe Wiki
Revision as of 11:33, 8 March 2017 by Admin (Talk | contribs)

Jump to: navigation, search

Request url: https://api.archivesportaleurope.net/services/search/ead. This service is a POST-request.

This search-service delivers a list of archival descriptions with the requested searchterm. There is no distinction between the level of description. The user is able to filter results on various facets and order on various fields.



Request parameters

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

eg.

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

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), ordered ascending by date.

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.

query

Containing the searchterm(s). Required.

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

sortRequest

Request parameters "sortRequest" enables you to sort the result. The sortRequest contains two parameters: sortType and fields.

In "fields", you can provide a list of 1 or more fields. The resultlist is ordered on field[0] first, field[1] secondly, etc. The possible fields are:

  • date: date of the archival material, provided in <unitdate>
  • findingAidNo: number of the finding aid, provided by the repository in <eadid>
  • title: description of the archival material, provided in <unittitle>
  • referenceCode: identifier of the archival material, provided by the repository in <unitid>

In all situations you can sort ascending or descending by setting request parameter "sortType" "asc" or "desc" respectively.

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 ...
  ],
  "sortFields": [
    "date",
    "findingAidNo",
    "title",
    "referenceCode"
  ],
  "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.

sortFields

This response parameter sums up the various fields you can use to order the resultList in a, new, additional request (see searchEad#sortRequest):

  • date
  • findingAidNo
  • title
  • referenceCode

facetFields

This response 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 decades

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