Difference between revisions of "searchEac"
(→dateFilters) |
|||
Line 8: | Line 8: | ||
Three request parameters can be used to do a search in descriptions of records creators and two types of filters can be used. | 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: | |
<pre> | <pre> | ||
{ | { | ||
− | "count": 5, | + | "count": "5", |
"startIndex": 0, | "startIndex": 0, | ||
− | "query": " | + | "query": "*", |
+ | "filters": [ | ||
+ | { | ||
+ | "facetFieldName": "string", | ||
+ | "facetFieldIds": [ | ||
+ | "string" | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | "dateFilters": [ | ||
+ | { | ||
+ | "dateFieldName": "string", | ||
+ | "dateFieldId": "string" | ||
+ | } | ||
+ | ], | ||
+ | "sortRequest": { | ||
+ | "sortType": "asc", | ||
+ | "fields": [ | ||
+ | "string" | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Basic Request example: | ||
+ | <pre> | ||
+ | { | ||
+ | "count": "5", | ||
+ | "startIndex": 0, | ||
+ | "query": "Onderwijsraad", | ||
"filters": [ | "filters": [ | ||
{ | { | ||
Line 25: | Line 54: | ||
"dateFilters": [ | "dateFilters": [ | ||
{ | { | ||
− | "dateFieldName": " | + | "dateFieldName": "fromdate", |
"dateFieldId": "1800-01-01_2" | "dateFieldId": "1800-01-01_2" | ||
} | } | ||
− | ] | + | ], |
+ | "sortRequest": { | ||
+ | "sortType": "asc", | ||
+ | "fields": [ | ||
+ | "string" | ||
+ | ] | ||
+ | } | ||
} | } | ||
</pre> | </pre> | ||
− | This example searches for archival descriptions with the term " | + | 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 == | == count == | ||
Line 44: | Line 79: | ||
== filters == | == filters == | ||
− | Request parameter "filters" enables you to filter the result on facets. The facets are summarized in [[ | + | Request parameter "filters" enables you to filter the result on facets. The facets are summarized in [[SearchEac#facets]]. |
== dateFilters == | == dateFilters == | ||
− | Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarized in [[ | + | Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarized 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. | ||
<br/><br/> | <br/><br/> | ||
Line 53: | Line 98: | ||
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> | <pre> | ||
{ | { | ||
− | "totalResults": | + | "totalResults": 0, |
"startIndex": 0, | "startIndex": 0, | ||
− | "totalPages": | + | "totalPages": 0, |
"eacSearchResults": [ | "eacSearchResults": [ | ||
{ | { | ||
− | "id": " | + | "id": "string", |
− | "recordId": " | + | "recordId": "string", |
− | "entityType": " | + | "entityType": "string", |
"nameEntries": [ | "nameEntries": [ | ||
− | " | + | "string" |
− | + | ||
], | ], | ||
"nameEntriesWithHighlighting": [ | "nameEntriesWithHighlighting": [ | ||
− | " | + | "string" |
], | ], | ||
− | "existDates": " | + | "existDates": "string", |
− | "description": " | + | "description": "string", |
− | "other": " | + | "descriptionWithHighlighting": "string", |
− | " | + | "other": "string", |
− | "repository": " | + | "otherWithHighlighting": "string", |
− | "repositoryCode": "NL- | + | "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 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Basic Response example (ie response for the basic request example above): | ||
+ | <pre> | ||
+ | { | ||
+ | "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", | "country": "NETHERLANDS", | ||
"countryId": "7", | "countryId": "7", | ||
− | "numberOfArchivalMaterialRelations": " | + | "numberOfArchivalMaterialRelations": "0", |
− | "numberOfNameRelations": " | + | "numberOfNameRelations": "0" |
− | }, | + | } |
− | + | ], | |
+ | "sortFields": [ | ||
+ | "date" | ||
], | ], | ||
"facetFields": { | "facetFields": { | ||
Line 89: | Line 233: | ||
"id": "7", | "id": "7", | ||
"name": "NETHERLANDS", | "name": "NETHERLANDS", | ||
− | "frequency": | + | "frequency": 1 |
− | }, | + | } |
+ | ], | ||
+ | "repository": [ | ||
{ | { | ||
− | "id": " | + | "id": "32171", |
− | "name": " | + | "name": "Nationaal Archief", |
− | "frequency": | + | "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": { | "facetDateFields": { | ||
− | + | "fromDate": [ | |
− | + | { | |
− | + | "id": "1800-01-01_2", | |
− | + | "name": "1800-1999", | |
− | + | "frequency": 1 | |
− | + | } | |
− | + | ], | |
− | + | "toDate": [] | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
</pre> | </pre> | ||
Line 142: | Line 293: | ||
{| class="wikitable" | {| class="wikitable" | ||
| id | | id | ||
− | | | + | | Internal APE identifier of the result |
|- | |- | ||
| recordId | | recordId | ||
− | | | + | | Identifier of the record provided by the repository |
|- | |- | ||
| entityType | | entityType | ||
− | | | + | | Type of the entity that is being described in the record: "corporatebody", "family", "person" |
|- | |- | ||
| nameEntries | | nameEntries | ||
− | | | + | | Name of the entity that is being described in the record |
|- | |- | ||
| 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 |
|- | |- | ||
| existDates | | existDates | ||
− | | | + | | Dates indicating the period of existence of the entity |
|- | |- | ||
| description | | description | ||
− | | | + | | Further description of the entity |
|- | |- | ||
| 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 |
|- | |- | ||
| other | | other | ||
− | | | + | | Possible additional description of the entity |
|- | |- | ||
| 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 |
|- | |- | ||
| repository | | repository | ||
− | | Name of the repository holding the | + | | Name of the repository holding the record of the entity |
|- | |- | ||
| 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 | ||
− | | | + | | Internal APE identifier for the country |
|- | |- | ||
| numberOfArchivalMaterialRelations | | numberOfArchivalMaterialRelations | ||
− | | | + | | Amount of relations to archival material created by the entity |
|- | |- | ||
| numberOfNameRelations | | 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 == | == facetFields == | ||
− | This | + | This response parameter gives an enumeration of facets. Every facet has three variables. |
{| class="wikitable" | {| class="wikitable" | ||
Line 214: | Line 370: | ||
|- | |- | ||
| entityType | | entityType | ||
− | | | + | | Type of the entity that is being described in the record: "corporatebody", "family", "person" |
|- | |- | ||
| place | | place | ||
− | | | + | | Geographical name for the location of the entity |
|- | |- | ||
| language | | language | ||
− | | | + | | Language of the description of the record |
|- | |- | ||
− | | | + | | 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 | + | 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" |
Revision as of 10:50, 5 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.
Contents
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 searchterm(s). Required.
filters
Request parameter "filters" enables you to filter the result on facets. The facets are summarized in SearchEac#facets.
dateFilters
Request parameters "dateFilters" enables you to filter the result on a certain period of time. The dateFacets are summarized 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 (ie 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 emphasize 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 emphasize 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 emphasize 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 searchterm. |
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. |