Difference between revisions of "getDocs"

From Archives Portal Europe Wiki
Jump to: navigation, search
(Created page with "Request url: <code>https://api.archivesportaleurope.net/services/institute/getDocs</code> This service is a POST-request. <div><br/>__TOC__<br/></div> = Request parameters =...")
 
(Basic Response example)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
Request url: <code>https://api.archivesportaleurope.net/services/institute/getDocs</code>
+
Request url: [https://www.archivesportaleurope.net/ApeApi/#!/institute/getInsDocument <code>https://api.archivesportaleurope.net/services/institute/getDocs</code>].
 
+
 
This service is a POST-request.
 
This service is a POST-request.
 +
 +
This institute-service delivers a list of finding aids, holding guides and source guides provided by one particular (archival) institution as Open Data via the API. Remember that this only works for (archival) institutions that have enabled Open Data in the Archives Portal Europe's Dashboard.
 +
 
<div><br/>__TOC__<br/></div>
 
<div><br/>__TOC__<br/></div>
 
= Request parameters =
 
= Request parameters =
eg.
+
Four request parameters can be used to get a list of the documents of an (archival) institution that has enabled the API services for its datasets in the Archives Portal Europe's Dashboard.
<pre>
+
 
 +
== 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;">
 
{
 
{
   "instituteId": "361",
+
  "count": "5",
 +
  "startIndex": 0,
 +
   "instituteId": " ",
 
   "docType": "fa",
 
   "docType": "fa",
   "count": 0,
+
   "sortRequest": {
  "startIndex": 0
+
    "sortType": "asc",
 +
    "fields": [
 +
      "string"
 +
    ]
 +
  }
 
}
 
}
 
</pre>
 
</pre>
  
== instituteId ==
+
== Basic Request example ==
APE-identifier for the repository from which you want to get the list of documents. Required.
+
For 5 documents, ie finding aids (fa), of the Nationaal Archief, ie identified with internal APE identifier 2437, shown sorted on finding aid number (ascending):
  
== docType ==
+
''N.B.: you can find the (internal APE) identifier of an archival institution for using this service via the [[getInstitutes | /institute/getInstitutes/{startIndex}/{count}]] service''
  
Depending on which type of archival description you want, use "fa" for finding aid, "hg" for holdingsguide or "sg" for sourceguide. Required.
+
<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,
 +
  "instituteId": "2437",
 +
  "docType": "fa",
 +
  "sortRequest": {
 +
    "sortType": "asc",
 +
    "fields": [
 +
      "findingAidNo"
 +
    ]
 +
  }
 +
}
 +
</pre>
  
 
== count ==
 
== count ==
Line 26: Line 49:
 
== startIndex ==
 
== 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.
 
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.
 +
 +
== instituteId ==
 +
Internal APE identifier for the archival institution (repository) from which you want to get the list of documents (required)
 +
 +
== docType ==
 +
Depending on which type of archival description you want, use "fa" for finding aids, "hg" for holdings guides or "sg" for source guides (required)
 +
 +
== 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 =
  
eg.
+
The response contains basic information on the documents of the (archival) institution for which the list of documents was requested.
<pre>
+
 
 +
== 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": 6714,
+
   "totalResults": 0,
 
   "startIndex": 0,
 
   "startIndex": 0,
   "totalPages": 1343,
+
   "totalPages": 0,
 
   "eadResults": [
 
   "eadResults": [
 
     {
 
     {
       "id": "F11649",
+
       "id": "string",
       "fondsUnitTitle": "Inventaris van de Burgerlijke Stand der gemeente Sommelsdijk",
+
       "findingAidTitle": "string",
       "fondsUnitId": "3.198.07",
+
      "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"
 +
    }
 +
  ],
 +
  "sortFields": [
 +
    "string"
 +
  ]
 +
}
 +
</pre>
 +
 
 +
== Basic Response example ==
 +
For the [[getDocs#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": 6807,
 +
  "startIndex": 0,
 +
  "totalPages": 1362,
 +
  "eadResults": [
 +
    {
 +
      "id": "F687114",
 +
      "findingAidTitle": "Inventaris van archieven van het Directoraat-Generaal voor de Volksontwikkeling en taakvoorgangers van het ministerie van Onderwijs, Kunsten en Wetenschappen, (1926) 1945-1965",
 +
       "findingAidNo": "2.14.51",
 
       "repository": "Nationaal Archief",
 
       "repository": "Nationaal Archief",
 
       "country": "NETHERLANDS",
 
       "country": "NETHERLANDS",
 
       "language": "",
 
       "language": "",
 
       "langMaterial": "",
 
       "langMaterial": "",
       "unitDate": "1812-1932",
+
       "unitDate": "1926-1965",
 
       "repositoryCode": "NL-HaNA",
 
       "repositoryCode": "NL-HaNA",
 
       "hasDigitalObject": false,
 
       "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 8,
 +
      "numberOfDescendents": 1259,
 
       "docType": "Finding Aid",
 
       "docType": "Finding Aid",
 
       "docTypeId": "fa",
 
       "docTypeId": "fa",
 
       "level": "archdesc",
 
       "level": "archdesc",
       "indexDate": "Sun Dec 13 16:07:22 UTC 2015"
+
       "indexDate": ""
 +
    },
 +
    {
 +
      "id": "F685579",
 +
      "findingAidTitle": "Inventaris van het archief van het Centraal Technisch Instituut TNO",
 +
      "findingAidNo": "2.14.29.03",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1947-1963",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 881,
 +
      "docType": "Finding Aid",
 +
      "docTypeId": "fa",
 +
      "level": "archdesc",
 +
      "indexDate": ""
 +
    },
 +
    {
 +
      "id": "F685581",
 +
      "findingAidTitle": "Inventaris van het archief van het Rijksbureau voor de Voedselvoorziening in Oorlogstijd: Centraal Bureau voor Onderzoek van Verzoek- en Bezwaarschriften, 1940-1944",
 +
      "findingAidNo": "2.11.30.14",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1940-1944",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 8,
 +
      "docType": "Finding Aid",
 +
      "docTypeId": "fa",
 +
      "level": "archdesc",
 +
      "indexDate": ""
 +
    },
 +
    {
 +
      "id": "F685589",
 +
      "findingAidTitle": "Inventaris van het archief van de Overlegcommissie Verkenningen van het Ministerie van Onderwijs, Cultuur en Wetenschappen, 1991-1997",
 +
      "findingAidNo": "2.14.98",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1991-1997",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 123,
 +
      "docType": "Finding Aid",
 +
      "docTypeId": "fa",
 +
      "level": "archdesc",
 +
      "indexDate": ""
 +
    },
 +
    {
 +
      "id": "F685622",
 +
      "findingAidTitle": "Inventaris van het archief van de Hoofdambtenaar voor de Crisistuchtrechtspraak, 1934-1941",
 +
      "findingAidNo": "2.09.40.02",
 +
      "repository": "Nationaal Archief",
 +
      "country": "NETHERLANDS",
 +
      "language": "",
 +
      "langMaterial": "",
 +
      "unitDate": "1934-1941",
 +
      "repositoryCode": "NL-HaNA",
 +
      "hasDigitalObject": false,
 +
      "numberOfDigitalObjects": 0,
 +
      "numberOfDigitalObjectsInDescendents": 0,
 +
      "numberOfDescendents": 60,
 +
      "docType": "Finding Aid",
 +
      "docTypeId": "fa",
 +
      "level": "archdesc",
 +
      "indexDate": ""
 
     }
 
     }
 +
  ],
 +
  "sortFields": [
 +
    "date",
 +
    "findingAidNo",
 +
    "orderId",
 +
    "title",
 +
    "referenceCode"
 
   ]
 
   ]
 
}
 
}
Line 68: Line 233:
 
Enumeration of the results. Depending on the value of Request parameter 'docType', result could be a holdings guide, a source guide or a finding aid.
 
Enumeration of the results. Depending on the value of Request parameter 'docType', result could be a holdings guide, a source guide or a finding aid.
  
(table)
+
{| class="wikitable"
 +
| id
 +
| Internal APE identifier of the result
 +
|-
 +
| findingAidTitle
 +
| Title of the document (finding aid, holdings guide or source guide)
 +
|-
 +
| findingAidNo
 +
| Identifier of the finding aid, holdings guide or source guide provided by the archival institution (repository)
 +
|-
 +
| repository
 +
| Name of the repository (archival institution) holding the material that is described in the document (finding aid, holdings guide or source guide)
 +
|-
 +
| country
 +
| Name of the country where the repository is, in English
 +
|-
 +
| language
 +
| Language of the description of the document (finding aid, holdings guide or source guide)
 +
|-
 +
| langMaterial
 +
| Language in which the archival material described in the document (finding aid, holdings guide or source guide) is created
 +
|-
 +
| unitDate
 +
| Date of creation of the archival material described in the document (finding aid, holdings guide or source guide)
 +
|-
 +
| 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
 +
| 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, ie amount of descriptive units in the document (finding aid, holdings guide or source guide)
 +
|-
 +
| docType
 +
| Type of document: "Finding Aid", "Holdings Guide", "Source Guide"
 +
|-
 +
| docTypeId
 +
| Acronym for the type of document: "fa" for "Finding Aid", "hg" for "Holdings Guide" or "sg" for "Source Guide"
 +
|-
 +
| level
 +
| Type of result: "archdesc" for highest level description or "clevel" for subordinate components (in this service it will always be: "archdesc")
 +
|-
 +
| indexDate
 +
| Date showing when the result was ingested/updated and indexed in the Archives Portal Europe (ie last change date)
 +
|}
 +
 
  
 
[[Category:Technical_documentation]]
 
[[Category:Technical_documentation]]

Latest revision as of 12:41, 10 January 2018

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

This institute-service delivers a list of finding aids, holding guides and source guides provided by one particular (archival) institution as Open Data via the API. Remember that this only works for (archival) institutions that have enabled Open Data in the Archives Portal Europe's Dashboard.



Request parameters

Four request parameters can be used to get a list of the documents of an (archival) institution that has enabled the API services for its datasets in the Archives Portal Europe's Dashboard.

Empty Request example

{
  "count": "5",
  "startIndex": 0,
  "instituteId": " ",
  "docType": "fa",
  "sortRequest": {
    "sortType": "asc",
    "fields": [
      "string"
    ]
  }
}

Basic Request example

For 5 documents, ie finding aids (fa), of the Nationaal Archief, ie identified with internal APE identifier 2437, shown sorted on finding aid number (ascending):

N.B.: you can find the (internal APE) identifier of an archival institution for using this service via the /institute/getInstitutes/{startIndex}/{count} service

{
  "count": "5",
  "startIndex": 0,
  "instituteId": "2437",
  "docType": "fa",
  "sortRequest": {
    "sortType": "asc",
    "fields": [
      "findingAidNo"
    ]
  }
}

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.

instituteId

Internal APE identifier for the archival institution (repository) from which you want to get the list of documents (required)

docType

Depending on which type of archival description you want, use "fa" for finding aids, "hg" for holdings guides or "sg" for source guides (required)

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 basic information on the documents of the (archival) institution for which the list of documents was requested.

Empty Response example

{
  "totalResults": 0,
  "startIndex": 0,
  "totalPages": 0,
  "eadResults": [
    {
      "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"
    }
  ],
  "sortFields": [
    "string"
  ]
}

Basic Response example

For the basic request example above:

{
  "totalResults": 6807,
  "startIndex": 0,
  "totalPages": 1362,
  "eadResults": [
    {
      "id": "F687114",
      "findingAidTitle": "Inventaris van archieven van het Directoraat-Generaal voor de Volksontwikkeling en taakvoorgangers van het ministerie van Onderwijs, Kunsten en Wetenschappen, (1926) 1945-1965",
      "findingAidNo": "2.14.51",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1926-1965",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 8,
      "numberOfDescendents": 1259,
      "docType": "Finding Aid",
      "docTypeId": "fa",
      "level": "archdesc",
      "indexDate": ""
    },
    {
      "id": "F685579",
      "findingAidTitle": "Inventaris van het archief van het Centraal Technisch Instituut TNO",
      "findingAidNo": "2.14.29.03",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1947-1963",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 881,
      "docType": "Finding Aid",
      "docTypeId": "fa",
      "level": "archdesc",
      "indexDate": ""
    },
    {
      "id": "F685581",
      "findingAidTitle": "Inventaris van het archief van het Rijksbureau voor de Voedselvoorziening in Oorlogstijd: Centraal Bureau voor Onderzoek van Verzoek- en Bezwaarschriften, 1940-1944",
      "findingAidNo": "2.11.30.14",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1940-1944",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 8,
      "docType": "Finding Aid",
      "docTypeId": "fa",
      "level": "archdesc",
      "indexDate": ""
    },
    {
      "id": "F685589",
      "findingAidTitle": "Inventaris van het archief van de Overlegcommissie Verkenningen van het Ministerie van Onderwijs, Cultuur en Wetenschappen, 1991-1997",
      "findingAidNo": "2.14.98",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1991-1997",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 123,
      "docType": "Finding Aid",
      "docTypeId": "fa",
      "level": "archdesc",
      "indexDate": ""
    },
    {
      "id": "F685622",
      "findingAidTitle": "Inventaris van het archief van de Hoofdambtenaar voor de Crisistuchtrechtspraak, 1934-1941",
      "findingAidNo": "2.09.40.02",
      "repository": "Nationaal Archief",
      "country": "NETHERLANDS",
      "language": "",
      "langMaterial": "",
      "unitDate": "1934-1941",
      "repositoryCode": "NL-HaNA",
      "hasDigitalObject": false,
      "numberOfDigitalObjects": 0,
      "numberOfDigitalObjectsInDescendents": 0,
      "numberOfDescendents": 60,
      "docType": "Finding Aid",
      "docTypeId": "fa",
      "level": "archdesc",
      "indexDate": ""
    }
  ],
  "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.

eadResults

Enumeration of the results. Depending on the value of Request parameter 'docType', result could be a holdings guide, a source guide or a finding aid.

id Internal APE identifier of the result
findingAidTitle Title of the document (finding aid, holdings guide or source guide)
findingAidNo Identifier of the finding aid, holdings guide or source guide provided by the archival institution (repository)
repository Name of the repository (archival institution) holding the material that is described in the document (finding aid, holdings guide or source guide)
country Name of the country where the repository is, in English
language Language of the description of the document (finding aid, holdings guide or source guide)
langMaterial Language in which the archival material described in the document (finding aid, holdings guide or source guide) is created
unitDate Date of creation of the archival material described in the document (finding aid, holdings guide or source guide)
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, ie amount of descriptive units in the document (finding aid, holdings guide or source guide)
docType Type of document: "Finding Aid", "Holdings Guide", "Source Guide"
docTypeId Acronym for the type of document: "fa" for "Finding Aid", "hg" for "Holdings Guide" or "sg" for "Source Guide"
level Type of result: "archdesc" for highest level description or "clevel" for subordinate components (in this service it will always be: "archdesc")
indexDate Date showing when the result was ingested/updated and indexed in the Archives Portal Europe (ie last change date)