Difference between revisions of "searchEac"

From Archives Portal Europe Wiki
Jump to: navigation, search
(Request parameters)
(Response parameters)
Line 95: Line 95:
  
 
= 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:
+
== Empty Response 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;">
 
{
 
{
 
   "totalResults": 0,
 
   "totalResults": 0,
Line 193: Line 193:
 
</pre>
 
</pre>
  
Basic Response example (ie response for the basic request example above):
+
== Basic Response example ==
 +
Response for the 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;">
 
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">
 
{
 
{
Line 304: Line 305:
 
|-
 
|-
 
| nameEntriesWithHighlighting  
 
| nameEntriesWithHighlighting  
| Name of the entity that is being described in the record, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request
+
| Name of the entity that is being described in the record, with the mark "<nowiki><em></nowiki>" to emphasise the search term that was used in the search request
 
|-
 
|-
 
| existDates
 
| existDates
Line 313: Line 314:
 
|-
 
|-
 
| descriptionWithHighlighting
 
| descriptionWithHighlighting
| Further description of the entity, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request
+
| Further description of the entity, with the mark "<nowiki><em></nowiki>" to emphasise the search term that was used in the search request
 
|-
 
|-
 
| other
 
| other
Line 319: Line 320:
 
|-
 
|-
 
| otherWithHighlighting
 
| otherWithHighlighting
| Possible additional description of the entity, with the mark "<nowiki><em></nowiki>" to emphasize the search term that was used in the search request
+
| Possible additional description of the entity, with the mark "<nowiki><em></nowiki>" to emphasise the search term that was used in the search request
 
|-
 
|-
 
| repository  
 
| repository  
Line 325: Line 326:
 
|-
 
|-
 
| repositoryCode  
 
| 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]
+
| 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]
 
|-
 
|-
 
| country  
 
| country  
| Name of the country where the repository is. In English
+
| Name of the country where the repository is, in English
 
|-
 
|-
 
| countryId
 
| countryId
Line 350: Line 351:
 
{| 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 363: Line 364:
 
{| 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.
 
|-
 
|-
 
| repository  
 
| repository  
| Name of the repository responsible for the record.
+
| Name of the repository responsible for the record
 
|-
 
|-
 
| entityType  
 
| entityType  
Line 378: Line 379:
 
|-
 
|-
 
| 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 decades
+
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]]

Revision as of 08:55, 6 June 2017

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

This search-service delivers a list of authority records for Corporate Bodies, Persons or Families (CPF) with the requested searchterm. A web developer is able to filter results on various facets.



Request parameters

Three request parameters can be used to do a search in descriptions of records creators and two types of filters can be used.

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": "Onderwijsraad",
  "filters": [
    {
      "facetFieldName": "country",
      "facetFieldIds": [
        "7"
      ]
    }
  ],
  "dateFilters": [
    {
      "dateFieldName": "fromdate",
      "dateFieldId": "1800-01-01_2"
    }
  ],
  "sortRequest": {
    "sortType": "asc",
    "fields": [
      "string"
    ]
  }
}

This example searches for archival descriptions with the term "Onderwijsraad" 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).

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 searchEac#facets.

dateFilters

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

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,
  "eacSearchResults": [
    {
      "id": "string",
      "recordId": "string",
      "entityType": "string",
      "nameEntries": [
        "string"
      ],
      "nameEntriesWithHighlighting": [
        "string"
      ],
      "existDates": "string",
      "description": "string",
      "descriptionWithHighlighting": "string",
      "other": "string",
      "otherWithHighlighting": "string",
      "repository": "string",
      "repositoryCode": "string",
      "country": "string",
      "countryId": "string",
      "numberOfArchivalMaterialRelations": "string",
      "numberOfNameRelations": "string"
    }
  ],
  "sortFields": [
    "string"
  ],
  "facetFields": {
    "country": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "repository": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "entityType": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "place": [
      {
        "id": "string",
        "name": "string",
        "frequency": 0
      }
    ],
    "language": [
      {
        "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": 1,
  "startIndex": 0,
  "totalPages": 1,
  "eacSearchResults": [
    {
      "id": "15170",
      "recordId": "0b04eb34-8732-4387-8417-3ea1a120723d",
      "entityType": "corporatebody",
      "nameEntries": [
        "Onderwijsraad (OenW, OCW)",
        "Onderwijsraad (OenW, OCW)"
      ],
      "nameEntriesWithHighlighting": [
        "<em>Onderwijsraad</em> (OenW, OCW)"
      ],
      "existDates": "1919",
      "description": " Rijksoverheid De Onderwijsraad is het adviesorgaan voor de regering op het terrein van het onderwijs. De raad adviseert over de hoofdlijnen van het beleid en de wetgeving op het gebied van het onderwijs. Hij neemt een onafhankelijke positie in zowel ten opzichte van het Ministerie van Onderwijs, Cultuur en Wetenschap en dat van Economische Zaken, Landbouw en Innovatie als ten opzichte van het onderwijsveld. Niet alleen adviseert de raad - gevraagd dan wel ongevraagd - de betrokken bewindslieden, maar ook de Eerste en Tweede Kamer kunnen om advies vragen. Ook gemeenten kunnen in speciale bij de wet geregelde gevallen een beroep doen op de Onderwijsraad.SamenstellingDe raad telt ten minste acht en ten hoogste negentien leden. Zij worden bij Koninklijk Besluit op persoonlijke titel voor een periode van maximaal vier jaar benoemd. Daarna kunnen zij twee maal worden herbenoemd. Zij zijn onafhankelijk en vertegenwoordigen geen belangengroepen. De leden van de raad worden benoemd vanwege hun deskundigheid en zijn afkomstig uit verschillende geledingen van de maatschappij (onderwijs, wetenschap, het openbaar bestuur).",
      "descriptionWithHighlighting": " Rijksoverheid De <em>Onderwijsraad</em> is het adviesorgaan voor de regering op het terrein van het onderwijs",
      "other": "",
      "otherWithHighlighting": null,
      "repository": "Nationaal Archief",
      "repositoryCode": "NL-HaNA",
      "country": "NETHERLANDS",
      "countryId": "7",
      "numberOfArchivalMaterialRelations": "0",
      "numberOfNameRelations": "0"
    }
  ],
  "sortFields": [
    "date"
  ],
  "facetFields": {
    "country": [
      {
        "id": "7",
        "name": "NETHERLANDS",
        "frequency": 1
      }
    ],
    "repository": [
      {
        "id": "32171",
        "name": "Nationaal Archief",
        "frequency": 1
      }
    ],
    "entityType": [
      {
        "id": "corporatebody",
        "name": "corporatebody",
        "frequency": 1
      }
    ],
    "place": [],
    "language": [
      {
        "id": "dut",
        "name": "dut",
        "frequency": 1
      }
    ],
    "unitDateType": [
      {
        "id": "unknownstartdate",
        "name": "unknownstartdate",
        "frequency": 1
      }
    ]
  },
  "facetDateFields": {
    "fromDate": [
      {
        "id": "1800-01-01_2",
        "name": "1800-1999",
        "frequency": 1
      }
    ],
    "toDate": []
  }
}

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.

eacSearchResults

Enumeration of the results. They are all optional except "id".

id Internal APE identifier of the result
recordId Identifier of the record provided by the repository
entityType Type of the entity that is being described in the record: "corporatebody", "family", "person"
nameEntries Name of the entity that is being described in the record
nameEntriesWithHighlighting Name of the entity that is being described in the record, with the mark "<em>" to emphasise the search term that was used in the search request
existDates Dates indicating the period of existence of the entity
description Further description of the entity
descriptionWithHighlighting Further description of the entity, with the mark "<em>" to emphasise the search term that was used in the search request
other Possible additional description of the entity
otherWithHighlighting Possible additional description of the entity, with the mark "<em>" to emphasise the search term that was used in the search request
repository Name of the repository holding the record of the entity
repositoryCode Code of the repository holding the fonds; preferably, but not necessarily ISIL
country Name of the country where the repository is, in English
countryId Internal APE identifier for the country
numberOfArchivalMaterialRelations Amount of relations to archival material created by the entity
numberOfNameRelations Amount of relations to other entities

sortFields

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

  • date

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.
repository Name of the repository responsible for the record
entityType Type of the entity that is being described in the record: "corporatebody", "family", "person"
place Geographical name for the location of the entity
language Language of the description of the record
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