Difference between revisions of "searchEadDescendants"

From Archives Portal Europe Wiki
Jump to: navigation, search
Line 8: Line 8:
 
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>
 +
ID = .....
  
 +
{
 +
  "count": "5",
 +
  "startIndex": 0,
 +
  "query": "*"
 +
}
 +
</pre>
 +
 +
Basic Request example:
 
<pre>
 
<pre>
 +
ID = F379215
 +
 
{
 
{
   "count": 5,
+
   "count": "5",
 
   "startIndex": 0,
 
   "startIndex": 0,
 
   "query": "nepal"
 
   "query": "nepal"
Line 18: Line 30:
 
</pre>
 
</pre>
  
On [base_url]/search/ead/F9816/descendants, it gives all the clevel descriptive units of finding aid identified with "F9816", that contain the searchterm "nepal".
+
On [base_url]/search/ead/F379215/descendants, it gives all the clevel descriptive units of finding aid identified with "F379215", that contain the searchterm "nepal".
  
 
== count ==
 
== count ==
Line 28: Line 40:
 
== query ==
 
== query ==
 
Containing the searchterm(s). Required.
 
Containing the searchterm(s). Required.
 +
<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.
  
eg.
+
Empty Response example:
 
<pre>
 
<pre>
 
{
 
{
   "totalResults": 34,
+
   "totalResults": 0,
 
   "startIndex": 0,
 
   "startIndex": 0,
   "totalPages": 7,
+
   "totalPages": 0,
 
   "eadSearchResults": [
 
   "eadSearchResults": [
 
     {
 
     {
       "id": "C5026409",
+
       "id": "string",
       "fondsUnitTitle": "Inventaris van het code-archief van het Ministerie van Buitenlandse Zaken, 1955-1964",
+
      "fondsUnitTitle": "string",
       "fondsUnitId": "2.05.118",
+
      "fondsUnitId": "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",
 +
      "unitTitle": "string",
 +
      "unitTitleWithHighlighting": "string",
 +
      "scopeContent": "string",
 +
      "scopeContentWithHighlighting": "string",
 +
      "numberOfAncestors": 0
 +
    }
 +
  ],
 +
  "sortFields": [
 +
    "string"
 +
  ]
 +
}
 +
</pre>
 +
 
 +
Basic Response example (ie response for the basic request example above):
 +
<pre>
 +
{
 +
  "totalResults": 3,
 +
  "startIndex": 0,
 +
  "totalPages": 1,
 +
  "eadSearchResults": [
 +
    {
 +
      "id": "C85477181",
 +
       "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",
 
       "repository": "Nationaal Archief",
 
       "country": "NETHERLANDS",
 
       "country": "NETHERLANDS",
 
       "language": "",
 
       "language": "",
 
       "langMaterial": "",
 
       "langMaterial": "",
       "unitDate": "1961",
+
       "unitDate": "2002",
 
       "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 10:18:59 UTC 2015",
+
       "indexDate": "",
       "unitId": "2.05.118 - 11917",
+
       "unitId": "2.19.225 - 5529",
       "unitTitle": "Nepal, 1961",
+
       "unitTitle": "Nepal",
       "unitTitleWithHighlighting": "<em>Nepal</em>, 1961",
+
       "unitTitleWithHighlighting": "<em>Nepal</em>",
 
       "scopeContent": "",
 
       "scopeContent": "",
       "scopeContentWithHighlighting": null
+
       "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 4
 
     },
 
     },
  ... skip ...
+
    {
 +
      "id": "C85474511",
 +
      "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": "2003",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "Descriptive Unit",
 +
      "docTypeId": "du",
 +
      "level": "clevel",
 +
      "indexDate": "",
 +
      "unitId": "2.19.225 - 2798",
 +
      "unitTitle": "C. Kant Jha ten behoeve van onderzoek in Nepal",
 +
      "unitTitleWithHighlighting": "C. Kant Jha ten behoeve van onderzoek in <em>Nepal</em>",
 +
      "scopeContent": "",
 +
      "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 7
 +
    },
 +
    {
 +
      "id": "C85473776",
 +
      "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": "1994",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 0,
 +
      "docType": "Descriptive Unit",
 +
      "docTypeId": "du",
 +
      "level": "clevel",
 +
      "indexDate": "",
 +
      "unitId": "2.19.225 - 2124",
 +
      "unitTitle": "Paul Janssen ten behoeve van zijn studie aan de London School of Hygiene  & Tropical Medicine in verband met zijn onderzoek naar 'The rol for NGO's in the implementation of the National Aids Programme in Nepal'",
 +
      "unitTitleWithHighlighting": " the implementation of the National Aids Programme in <em>Nepal</em>'",
 +
      "scopeContent": "",
 +
      "scopeContentWithHighlighting": null,
 +
      "numberOfAncestors": 8
 +
    }
 
   ],
 
   ],
 
   "sortFields": [
 
   "sortFields": [
Line 88: Line 193:
 
| Internal APE identifier of the result
 
| Internal APE identifier of the result
 
|-
 
|-
| unitId
+
| fondsUnitTitle
| Identifier of the result provided by the repository
+
| Title of the finding aid.
 
|-
 
|-
| unitTitle
+
| fondsUnitId
| 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
 +
|-
 +
| 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  
 
| unitDate  
 
| Date of creation of the result.
 
| Date of creation of the result.
 
|-
 
|-
| scopeContent
+
| repositoryCode
| More descriptive information about the result.
+
| 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]
|-
+
| scopeContentWithHighlighting
+
| More descriptive information about the result, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request.
+
 
|-
 
|-
 
| hasDigitalObject  
 
| hasDigitalObject  
 
| TRUE/FALSE
 
| TRUE/FALSE
 
|-
 
|-
| 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 archives describing document where the result is found: "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit"
 +
|-
 +
| docTypeId
 +
| Acronym for the type of archives 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
+
| unitTitle
| Name of the repository holding the fonds
+
| Description of the result
 
|-
 
|-
| repositoryCode
+
| unitTitleWithHighlighting
| 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, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request
 
|-
 
|-
| country
+
| scopeContent
| Name of the country where the repository is. In English.
+
| More descriptive information about the result.
 +
|-
 +
| scopeContentWithHighlighting
 +
| More descriptive information about the result, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request
 +
|-
 +
| numberOfAncestors
 +
| Amount of ancestors (higher levels) for the result
 
|}
 
|}
  

Revision as of 11:02, 5 June 2017

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

This search service delivers a list of archival descriptions with the requested search term in the subtree of the archival description identified with {id}. A web developer can use this service to create a tree-like presentation of a search result.



Request parameters

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

Empty Request example:

ID = .....

{
  "count": "5",
  "startIndex": 0,
  "query": "*"
}

Basic Request example:

ID = F379215

{
  "count": "5",
  "startIndex": 0,
  "query": "nepal"
}

On [base_url]/search/ead/F379215/descendants, it gives all the clevel descriptive units of finding aid identified with "F379215", that contain the searchterm "nepal".

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.

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",
      "fondsUnitTitle": "string",
      "fondsUnitId": "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",
      "unitTitle": "string",
      "unitTitleWithHighlighting": "string",
      "scopeContent": "string",
      "scopeContentWithHighlighting": "string",
      "numberOfAncestors": 0
    }
  ],
  "sortFields": [
    "string"
  ]
}

Basic Response example (ie response for the basic request example above):

{
  "totalResults": 3,
  "startIndex": 0,
  "totalPages": 1,
  "eadSearchResults": [
    {
      "id": "C85477181",
      "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,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.19.225 - 5529",
      "unitTitle": "Nepal",
      "unitTitleWithHighlighting": "<em>Nepal</em>",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 4
    },
    {
      "id": "C85474511",
      "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": "2003",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.19.225 - 2798",
      "unitTitle": "C. Kant Jha ten behoeve van onderzoek in Nepal",
      "unitTitleWithHighlighting": "C. Kant Jha ten behoeve van onderzoek in <em>Nepal</em>",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 7
    },
    {
      "id": "C85473776",
      "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": "1994",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 0,
      "docType": "Descriptive Unit",
      "docTypeId": "du",
      "level": "clevel",
      "indexDate": "",
      "unitId": "2.19.225 - 2124",
      "unitTitle": "Paul Janssen ten behoeve van zijn studie aan de London School of Hygiene  & Tropical Medicine in verband met zijn onderzoek naar 'The rol for NGO's in the implementation of the National Aids Programme in Nepal'",
      "unitTitleWithHighlighting": " the implementation of the National Aids Programme in <em>Nepal</em>'",
      "scopeContent": "",
      "scopeContentWithHighlighting": null,
      "numberOfAncestors": 8
    }
  ],
  "sortFields": [
    "date",
    "findingAidNo",
    "orderId",
    "title",
    "referenceCode"
  ]
}

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
fondsUnitTitle Title of the finding aid.
fondsUnitId 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
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 archives describing document where the result is found: "Finding Aid", "Holdings Guide", "Source Guide" or "Descriptive Unit"
docTypeId Acronym for the type of archives 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
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
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
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
  • orderId
  • title
  • referenceCode