Difference between revisions of "searchEad"

From Archives Portal Europe Wiki
Jump to: navigation, search
(dateFilters)
(Basic Response example)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
Request url: [https://www.archivesportaleurope.net/ApeApi/#!/search/search <code>https://api.archivesportaleurope.net/services/search/ead</code>]. This service is a POST-request.
  
Request url: <code>https://api.archivesportaleurope.net/services/search/ead</code>.
+
This search-service delivers a list of archival descriptions with the requested search term. There is no distinction between the level of description. The user is able to filter results on various facets and order on various fields.
 
+
This service is a POST-request.
+
 
<div><br/>__TOC__<br/></div>
 
<div><br/>__TOC__<br/></div>
 
= Request parameters =
 
= Request parameters =
 
Three request parameters can be used to do a search in archival descriptions.
 
Three request parameters can be used to do a search in archival descriptions.
  
eg.
+
== Empty Request example ==
 +
 
 +
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">
 +
{
 +
  "count": "5",
 +
  "startIndex": 0,
 +
  "query": "*",
 +
  "filters": [
 +
    {
 +
      "facetFieldName": "string",
 +
      "facetFieldIds": [
 +
        "string"
 +
      ]
 +
    }
 +
  ],
 +
  "dateFilters": [
 +
    {
 +
      "dateFieldName": "string",
 +
      "dateFieldId": "string"
 +
    }
 +
  ],
 +
  "sortRequest": {
 +
    "sortType": "asc",
 +
    "fields": [
 +
      "string"
 +
    ]
 +
  }
 +
}
 +
</pre>
 +
 
 +
== Basic Request example ==
  
<pre>
+
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">
 
{
 
{
   "count": 5,
+
   "count": "5",
 
   "startIndex": 0,
 
   "startIndex": 0,
 
   "query": "nepal",
 
   "query": "nepal",
Line 27: Line 56:
 
       "dateFieldId": "1800-01-01_2"
 
       "dateFieldId": "1800-01-01_2"
 
     }
 
     }
   ]
+
   ],
 +
  "sortRequest": {
 +
    "sortType": "asc",
 +
    "fields": [
 +
      "date"
 +
    ]
 +
  }
 
}
 
}
 
</pre>
 
</pre>
  
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).
+
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 ==
 
== count ==
Line 40: Line 75:
  
 
== query ==
 
== query ==
Containing the searchterm(s). Required.
+
Containing the search term(s). Required.
  
 
== filters ==
 
== filters ==
Request parameter "filters" enables you to filter the result on facets. The facets are summarized in [[searchEad#facets]].
+
Request parameter "filters" enables you to filter the result on facets. The facets are summarised in [[searchEad#facets]].
  
 
== dateFilters ==
 
== dateFilters ==
Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarized in [[searchEad#date_facets]]
+
Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarised 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.
 
<br/><br/>
 
<br/><br/>
  
 
= Response parameters =
 
= Response parameters =
The response contains a list of the descriptions where the requested search-term(s) was/were found.
+
The response contains a list of the descriptions where the requested search term(s) was/were found.
 +
 
 +
== Empty Response example ==
 +
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">
 +
{
 +
  "totalResults": 0,
 +
  "startIndex": 0,
 +
  "totalPages": 0,
 +
  "eadSearchResults": [
 +
    {
 +
      "id": "string",
 +
      "findingAidTitle": "string",
 +
      "findingAidNo": "string",
 +
      "repository": "string",
 +
      "country": "string",
 +
      "language": "string",
 +
      "langMaterial": "string",
 +
      "unitDate": "string",
 +
      "repositoryCode": "string",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "string",
 +
      "docTypeId": "string",
 +
      "level": "string",
 +
      "indexDate": "string",
 +
      "unitId": "string",
 +
      "parentId": "string",
 +
      "unitTitle": "string",
 +
      "unitTitleWithHighlighting": "string",
 +
      "scopeContent": "string",
 +
      "scopeContentWithHighlighting": "string",
 +
      "numberOfAncestors": 0
 +
    }
 +
  ],
 +
  "sortFields": [
 +
    "string"
 +
  ],
 +
  "facetFields": {
 +
    "country": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "subject": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "repository": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "docType": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "level": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "hasDigitalObject": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "digitalObjectType": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "unitDateType": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ]
 +
  },
 +
  "facetDateFields": {
 +
    "fromDate": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ],
 +
    "toDate": [
 +
      {
 +
        "id": "string",
 +
        "name": "string",
 +
        "frequency": 0
 +
      }
 +
    ]
 +
  }
 +
}
 +
</pre>
  
eg.
+
== Basic Response example ==
<pre>
+
Response for the [[searchEad#Basic_Request_example|basic request example]] above:
 +
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">
 
{
 
{
   "totalResults": 205,
+
   "totalResults": 160,
 
   "startIndex": 0,
 
   "startIndex": 0,
   "totalPages": 41,
+
   "totalPages": 32,
 
   "eadSearchResults": [
 
   "eadSearchResults": [
 
     {
 
     {
       "id": "C4237666",
+
       "id": "C395820381",
       "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)",
+
       "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1945-1954",
       "fondsUnitId": "2.19.225",
+
       "findingAidNo": "2.05.117",
 
       "repository": "Nationaal Archief",
 
       "repository": "Nationaal Archief",
 
       "country": "NETHERLANDS",
 
       "country": "NETHERLANDS",
 
       "language": "",
 
       "language": "",
 
       "langMaterial": "",
 
       "langMaterial": "",
       "unitDate": "2002",
+
       "unitDate": "1947",
 
       "repositoryCode": "NL-HaNA",
 
       "repositoryCode": "NL-HaNA",
 
       "hasDigitalObject": false,
 
       "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 
       "docType": "Descriptive Unit",
 
       "docType": "Descriptive Unit",
 
       "docTypeId": "du",
 
       "docTypeId": "du",
 
       "level": "clevel",
 
       "level": "clevel",
       "indexDate": "Mon Dec 07 00:47:07 UTC 2015",
+
       "indexDate": "",
       "unitId": "2.19.225 - 5529",
+
       "unitId": "2.05.117 - 15522",
       "unitTitle": "Nepal",
+
      "parentId": "C395820353",
       "unitTitleWithHighlighting": "<em>Nepal</em>",
+
       "unitTitle": "Nepal, 1947",
 +
       "unitTitleWithHighlighting": "<em>Nepal</em>, 1947",
 
       "scopeContent": "",
 
       "scopeContent": "",
       "scopeContentWithHighlighting": ""
+
       "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 8
 +
    },
 +
    {
 +
      "id": "C395820774",
 +
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1945-1954",
 +
      "findingAidNo": "2.05.117",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1949",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "Descriptive Unit",
 +
      "docTypeId": "du",
 +
      "level": "clevel",
 +
      "indexDate": "",
 +
      "unitId": "2.05.117 - 15881",
 +
      "parentId": "C395820748",
 +
      "unitTitle": "Nepal, 1949",
 +
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1949",
 +
      "scopeContent": "",
 +
      "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 8
 +
    },
 +
    {
 +
      "id": "C395973084",
 +
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
 +
      "findingAidNo": "2.05.118",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1963",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "Descriptive Unit",
 +
      "docTypeId": "du",
 +
      "level": "clevel",
 +
      "indexDate": "",
 +
      "unitId": "2.05.118 - 11429",
 +
      "parentId": "C395972998",
 +
      "unitTitle": "Nepal, 1963",
 +
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1963",
 +
      "scopeContent": "",
 +
      "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 10
 +
    },
 +
    {
 +
      "id": "C395973683",
 +
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
 +
      "findingAidNo": "2.05.118",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1961",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "Descriptive Unit",
 +
      "docTypeId": "du",
 +
      "level": "clevel",
 +
      "indexDate": "",
 +
      "unitId": "2.05.118 - 11917",
 +
      "parentId": "C395973633",
 +
      "unitTitle": "Nepal, 1961",
 +
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1961",
 +
      "scopeContent": "",
 +
      "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 7
 +
    },
 +
    {
 +
      "id": "C395977040",
 +
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
 +
      "findingAidNo": "2.05.118",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1959-1963",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "Descriptive Unit",
 +
      "docTypeId": "du",
 +
      "level": "clevel",
 +
      "indexDate": "",
 +
      "unitId": "2.05.118 - 14663",
 +
      "parentId": "C395976953",
 +
      "unitTitle": "Nepal; grondwet",
 +
      "unitTitleWithHighlighting": "<em>Nepal</em>; grondwet",
 +
      "scopeContent": "",
 +
      "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 6
 
     }
 
     }
  ... skip ...
+
  ],
 +
  "sortFields": [
 +
    "date",
 +
    "findingAidNo",
 +
    "orderId",
 +
    "title",
 +
    "referenceCode"
 
   ],
 
   ],
 
   "facetFields": {
 
   "facetFields": {
Line 87: Line 365:
 
         "id": "7",
 
         "id": "7",
 
         "name": "NETHERLANDS",
 
         "name": "NETHERLANDS",
         "frequency": 180
+
         "frequency": 160
 
       },
 
       },
 
       {
 
       {
         "id": "16",
+
         "id": "3",
         "name": "FRANCE",
+
         "name": "GERMANY",
         "frequency": 25
+
         "frequency": 60
 
       }
 
       }
 
     ],
 
     ],
 +
    "subject": [],
 +
    "repository": [
 +
      {
 +
        "id": "2437",
 +
        "name": "Nationaal Archief",
 +
        "frequency": 150
 +
      },
 +
      {
 +
        "id": "2091",
 +
        "name": "Internationaal Instituut voor Sociale Geschiedenis",
 +
        "frequency": 9
 +
      },
 +
      {
 +
        "id": "373",
 +
        "name": "Erfgoed Leiden en omstreken",
 +
        "frequency": 1
 +
      }
 +
    ],
 +
    "docType": [
 +
      {
 +
        "id": "fa",
 +
        "name": "fa",
 +
        "frequency": 159
 +
      },
 +
      {
 +
        "id": "hg",
 +
        "name": "hg",
 +
        "frequency": 1
 +
      }
 +
    ],
 +
    "level": [
 +
      {
 +
        "id": "clevel",
 +
        "name": "clevel",
 +
        "frequency": 147
 +
      },
 +
      {
 +
        "id": "archdesc",
 +
        "name": "archdesc",
 +
        "frequency": 13
 +
      }
 +
    ],
 +
    "hasDigitalObject": [
 +
      {
 +
        "id": "false",
 +
        "name": "false",
 +
        "frequency": 160
 +
      }
 +
    ],
 +
    "digitalObjectType": [],
 +
    "unitDateType": [
 +
      {
 +
        "id": "normal",
 +
        "name": "normal",
 +
        "frequency": 160
 +
      }
 +
    ]
 +
  },
 
   "facetDateFields": {
 
   "facetDateFields": {
      "fromDate": [
+
    "fromDate": [
        {
+
      {
          "id": "1800-01-01_2",
+
        "id": "1920-01-01_3",
          "name": "1800-1999",
+
        "name": "1920-1939",
          "frequency": 166
+
        "frequency": 4
        },
+
      },
        {
+
      {
          "id": "2000-01-01_2",
+
        "id": "1940-01-01_3",
          "name": "2000-2199",
+
        "name": "1940-1959",
          "frequency": 2
+
        "frequency": 64
         }
+
      },
       ],
+
      {
       "toDate": [
+
         "id": "1960-01-01_3",
        {
+
        "name": "1960-1979",
          "id": "1800-01-01_2",
+
        "frequency": 81
          "name": "1800-1999",
+
      },
          "frequency": 166
+
       {
        },
+
        "id": "1980-01-01_3",
        {
+
        "name": "1980-1999",
          "id": "2000-01-01_2",
+
        "frequency": 11
          "name": "2000-2199",
+
       }
          "frequency": 2
+
    ],
        }
+
    "toDate": [
      ]
+
      {
    }
+
        "id": "1800-01-01_2",
 +
        "name": "1800-1999",
 +
        "frequency": 152
 +
      },
 +
      {
 +
        "id": "2000-01-01_2",
 +
        "name": "2000-2199",
 +
        "frequency": 8
 +
      }
 +
    ]
 +
  }
 
}
 
}
 
</pre>
 
</pre>
Line 134: Line 480:
  
 
== eadSearchResults ==
 
== 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".
+
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".
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 140: Line 486:
 
| Internal APE identifier of the result
 
| Internal APE identifier of the result
 
|-
 
|-
| unitId
+
| findingAidTitle
| Identifier of the result provided by the repository
+
| Title of the finding aid
 
|-
 
|-
| unitTitle
+
| findingAidNo
| Description of the result
+
| Identifier of the fonds provided by the repository
 
|-
 
|-
| unitTitleWithHighlighting
+
| repository
| Description of the result, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request.
+
| Name of the repository holding the fonds
 
|-
 
|-
| unitDate
+
| country
| Date of creation of the result.
+
| Name of the country where the repository is, in English
 
|-
 
|-
| scopeContent
+
| language
| More descriptive information about the result.
+
| Language of the description of the result
 
|-
 
|-
| scopeContentWithHighlighting
+
| langMaterial
| More descriptive information about the result, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request.
+
| Language in which the result is created
 +
|-
 +
| unitDate
 +
| Date of creation of the result
 +
|-
 +
| repositoryCode
 +
| Code of the repository holding the fonds; preferably, but not necessarily [https://en.wikipedia.org/wiki/International_Standard_Identifier_for_Libraries_and_Related_Organizations ISIL]
 
|-
 
|-
 
| hasDigitalObject  
 
| hasDigitalObject  
| TRUE/FALSE
+
| TRUE/FALSE (only for the search result)
 
|-
 
|-
| langMaterial
+
| numberOfDigitalObjects
| Language in which the result is created.
+
| Amount of digital objects available for the search result (is always 0 in case 'hasDigitalObject' = FALSE)
 
|-
 
|-
| language
+
| numberOfDigitalOjectsInDescendents
| Language of the description of the result.
+
| Amount of digital objects available for descendents of the search result (can be > 0 in case 'hasDigtalObject' = FALSE)
 +
|-
 +
| numberOfDescendents
 +
| Amount of descendents of the search result
 
|-
 
|-
 
| docType  
 
| docType  
| Type of archives describing document where the result is found : "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit".
+
| Type of document in which the result is found: "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit"
 +
|-
 +
| docTypeId
 +
| Acronym for the type of document: "fa" for "Finding Aid", "hg" for "Holdings Guide", "sg" for "Source Guide" or "du" for "Descriptive unit"
 
|-
 
|-
 
| level
 
| level
 
| Type of result: "archdesc" for highest level description or "clevel" for subordinate components
 
| Type of result: "archdesc" for highest level description or "clevel" for subordinate components
 
|-
 
|-
| fondsUnitId
+
| indexDate
| Identifier of the fonds provided by the repository.
+
| Date showing when the result was ingested/updated and indexed in the Archives Portal Europe (ie last change date)
 
|-
 
|-
| fondsUnitTitle
+
| unitId
| Title of the finding aid.
+
| Identifier of the result provided by the repository
 
|-
 
|-
| repository
+
| parentId
| Name of the repository holding the fonds
+
| Internal APE Identifier of the parent of the result
 
|-
 
|-
| repositoryCode
+
| unitTitle
| Code of the repository holding the fonds. Preferably, but not necessarily [https://en.wikipedia.org/wiki/International_Standard_Identifier_for_Libraries_and_Related_Organizations ISIL].
+
| Description of the result
 
|-
 
|-
| country
+
| unitTitleWithHighlighting
| Name of the country where the repository is. In English.
+
| Description of the result, with the mark "<nowiki><em></nowiki>" to emphasise the search term that was used in the search request
 +
|-
 +
| scopeContent
 +
| More descriptive information about the result
 +
|-
 +
| scopeContentWithHighlighting
 +
| More descriptive information about the result, with the mark "<nowiki><em></nowiki>" to emphasise the search term that was used in the search request
 +
|-
 +
| numberOfAncestors
 +
| Amount of ancestors (higher levels) for the result
 
|}
 
|}
 +
 +
== 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 ==
 
== facetFields ==
This respsonse parameter gives an enumeration of facets. Every facet has three variables.
+
This response parameter gives an enumeration of facets. Every facet has three variables.
  
 
{| class="wikitable"
 
{| class="wikitable"
 
| id  
 
| id  
| Internal APE identifier of the value. Use this "id" in the filter request parameter.
+
| Internal APE identifier of the value; use this "id" in the filter request parameter
 
|-
 
|-
 
| name
 
| name
| Human readable value (in English).
+
| Human readable value (in English)
 
|-
 
|-
 
| frequency
 
| frequency
| The number of results of this facet containing the searchterm.
+
| The number of results of this facet containing the search term
 
|}
 
|}
  
Line 207: Line 582:
 
{| class="wikitable"
 
{| class="wikitable"
 
| country  
 
| country  
| Name of the country where the repository is. In English.
+
| Name of the country where the repository is, in English
 
|-
 
|-
 
| subject
 
| subject
Line 216: Line 591:
 
|-
 
|-
 
| docType  
 
| docType  
| Type of archives describing document where the result is found : "fa" for Finding Aid, "hg" for Holdings Guide or "sg" for Source Guide.
+
| Type of document in which the result is found: "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit"
 
|-
 
|-
 
| level
 
| level
Line 228: Line 603:
 
|-
 
|-
 
| unitDateType
 
| unitDateType
| Type of date describing the archival unit.
+
| Type of date describing the archival unit
 
|}
 
|}
  
 
=== date facets ===
 
=== 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
+
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
  
 
{| class="wikitable"
 
{| class="wikitable"
 
| fromDate
 
| fromDate
| Grouping of the search result in starting dates.
+
| Grouping of the search result in starting dates
 
|-
 
|-
 
| toDate
 
| toDate
| Grouping of the search result in ending dates.
+
| Grouping of the search result in ending dates
 
|}
 
|}
  
 
[[Category:Technical_documentation]]
 
[[Category:Technical_documentation]]

Latest revision as of 13:54, 9 January 2018

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 search term. 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.

Empty Request example

{
  "count": "5",
  "startIndex": 0,
  "query": "*",
  "filters": [
    {
      "facetFieldName": "string",
      "facetFieldIds": [
        "string"
      ]
    }
  ],
  "dateFilters": [
    {
      "dateFieldName": "string",
      "dateFieldId": "string"
    }
  ],
  "sortRequest": {
    "sortType": "asc",
    "fields": [
      "string"
    ]
  }
}

Basic Request example

{
  "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 search term(s). Required.

filters

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

dateFilters

Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarised 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.

Empty Response example

{
  "totalResults": 0,
  "startIndex": 0,
  "totalPages": 0,
  "eadSearchResults": [
    {
      "id": "string",
      "findingAidTitle": "string",
      "findingAidNo": "string",
      "repository": "string",
      "country": "string",
      "language": "string",
      "langMaterial": "string",
      "unitDate": "string",
      "repositoryCode": "string",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "string",
      "docTypeId": "string",
      "level": "string",
      "indexDate": "string",
      "unitId": "string",
      "parentId": "string",
      "unitTitle": "string",
      "unitTitleWithHighlighting": "string",
      "scopeContent": "string",
      "scopeContentWithHighlighting": "string",
      "numberOfAncestors": 0
    }
  ],
  "sortFields": [
    "string"
  ],
  "facetFields": {
    "country": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "subject": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "repository": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "docType": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "level": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "hasDigitalObject": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "digitalObjectType": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "unitDateType": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ]
  },
  "facetDateFields": {
    "fromDate": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "toDate": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ]
  }
}

Basic Response example

Response for the basic request example above:

{
  "totalResults": 160,
  "startIndex": 0,
  "totalPages": 32,
  "eadSearchResults": [
    {
      "id": "C395820381",
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1945-1954",
      "findingAidNo": "2.05.117",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1947",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.05.117 - 15522",
      "parentId": "C395820353",
      "unitTitle": "Nepal, 1947",
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1947",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 8
    },
    {
      "id": "C395820774",
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1945-1954",
      "findingAidNo": "2.05.117",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1949",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.05.117 - 15881",
      "parentId": "C395820748",
      "unitTitle": "Nepal, 1949",
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1949",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 8
    },
    {
      "id": "C395973084",
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
      "findingAidNo": "2.05.118",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1963",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.05.118 - 11429",
      "parentId": "C395972998",
      "unitTitle": "Nepal, 1963",
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1963",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 10
    },
    {
      "id": "C395973683",
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
      "findingAidNo": "2.05.118",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1961",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.05.118 - 11917",
      "parentId": "C395973633",
      "unitTitle": "Nepal, 1961",
      "unitTitleWithHighlighting": "<em>Nepal</em>, 1961",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 7
    },
    {
      "id": "C395977040",
      "findingAidTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
      "findingAidNo": "2.05.118",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1959-1963",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.05.118 - 14663",
      "parentId": "C395976953",
      "unitTitle": "Nepal; grondwet",
      "unitTitleWithHighlighting": "<em>Nepal</em>; grondwet",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 6
    }
  ],
  "sortFields": [
    "date",
    "findingAidNo",
    "orderId",
    "title",
    "referenceCode"
  ],
  "facetFields": {
    "country": [
      {
        "id": "7",
        "name": "NETHERLANDS",
        "frequency": 160
      },
      {
        "id": "3",
        "name": "GERMANY",
        "frequency": 60
      }
    ],
    "subject": [],
    "repository": [
      {
        "id": "2437",
        "name": "Nationaal Archief",
        "frequency": 150
      },
      {
        "id": "2091",
        "name": "Internationaal Instituut voor Sociale Geschiedenis",
        "frequency": 9
      },
      {
        "id": "373",
        "name": "Erfgoed Leiden en omstreken",
        "frequency": 1
      }
    ],
    "docType": [
      {
        "id": "fa",
        "name": "fa",
        "frequency": 159
      },
      {
        "id": "hg",
        "name": "hg",
        "frequency": 1
      }
    ],
    "level": [
      {
        "id": "clevel",
        "name": "clevel",
        "frequency": 147
      },
      {
        "id": "archdesc",
        "name": "archdesc",
        "frequency": 13
      }
    ],
    "hasDigitalObject": [
      {
        "id": "false",
        "name": "false",
        "frequency": 160
      }
    ],
    "digitalObjectType": [],
    "unitDateType": [
      {
        "id": "normal",
        "name": "normal",
        "frequency": 160
      }
    ]
  },
  "facetDateFields": {
    "fromDate": [
      {
        "id": "1920-01-01_3",
        "name": "1920-1939",
        "frequency": 4
      },
      {
        "id": "1940-01-01_3",
        "name": "1940-1959",
        "frequency": 64
      },
      {
        "id": "1960-01-01_3",
        "name": "1960-1979",
        "frequency": 81
      },
      {
        "id": "1980-01-01_3",
        "name": "1980-1999",
        "frequency": 11
      }
    ],
    "toDate": [
      {
        "id": "1800-01-01_2",
        "name": "1800-1999",
        "frequency": 152
      },
      {
        "id": "2000-01-01_2",
        "name": "2000-2199",
        "frequency": 8
      }
    ]
  }
}

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
findingAidTitle Title of the finding aid
findingAidNo Identifier of the fonds provided by the repository
repository Name of the repository holding the fonds
country Name of the country where the repository is, in English
language Language of the description of the result
langMaterial Language in which the result is created
unitDate Date of creation of the result
repositoryCode Code of the repository holding the fonds; preferably, but not necessarily ISIL
hasDigitalObject TRUE/FALSE (only for the search result)
numberOfDigitalObjects Amount of digital objects available for the search result (is always 0 in case 'hasDigitalObject' = FALSE)
numberOfDigitalOjectsInDescendents Amount of digital objects available for descendents of the search result (can be > 0 in case 'hasDigtalObject' = FALSE)
numberOfDescendents Amount of descendents of the search result
docType Type of document in which the result is found: "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit"
docTypeId Acronym for the type of document: "fa" for "Finding Aid", "hg" for "Holdings Guide", "sg" for "Source Guide" or "du" for "Descriptive unit"
level Type of result: "archdesc" for highest level description or "clevel" for subordinate components
indexDate Date showing when the result was ingested/updated and indexed in the Archives Portal Europe (ie last change date)
unitId Identifier of the result provided by the repository
parentId Internal APE Identifier of the parent of the result
unitTitle Description of the result
unitTitleWithHighlighting Description of the result, with the mark "<em>" to emphasise the search term that was used in the search request
scopeContent More descriptive information about the result
scopeContentWithHighlighting More descriptive information about the result, with the mark "<em>" to emphasise the search term that was used in the search request
numberOfAncestors Amount of ancestors (higher levels) for the result

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 search term

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 document in which 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
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