Beta maṣāḥǝft API documentation
The base uri for the API is https://betamasaheft.eu/api/
which will redirect
you here unless specified.
- API search
- API search KWIC
- QUERY RDF
- GET list
- GET raw data
- GET canonical title
- GET Clavis ids
- GET text
- GET other text
- GET place data in KML and geoJSON
- GET Pelagios Annotations
- Search Dillmann Lexicon
- GET list of lemmas in Dillmann Lexicon
- GET lemma from Dillmann Lexicon
- GET IIIF API Manifest
- GET SHINE API
API search
You can search the XML data with the following call. The parameter q takes the query text where white space is interpreted as OR. You can use lucene query synthax like Pie* or use "Pierre AND Bel" to find both Pierre and Bel in the selected elements.
Return to table of contents/api/search?element={elementName}&q={searchString}
Searchable elements
-
title
-
persName
-
placeName
-
ref
-
ab
-
l
-
p
-
q
-
colophon
-
incipit
-
explicit
-
note
-
summary
-
abstract
API KWIC search
You can search the XML data with a call like this:
Return to table of contents/api/kwicsearch?element={elementName} &q={searchString}
Searchable elements
-
title
-
persName
-
placeName
-
ref
-
ab
-
l
-
p
-
q
-
colophon
-
incipit
-
explicit
-
note
-
summary
-
abstract
-
many other TEI elements
Query the RDF triplestore
RDF triples are exported from the TEI data as they are committed to the app. NOT everything is there yet.
Thanks to this package by ljo, you can enter a SPARQL query to the RDF representation of the data as a parameter to this api request. PLEASE use single quotes ' not double.
PREFIXes are already there, start with SELECT... A super tutorial on how to build SPARQL queries is here at Apache Jena
Here you can find the current ontology developed with Protégé.
Some examples of the data you are querying
Return to table of contents/api/SPARQL
Click on link
/api/SPARQL/json
/api/SPARQL/relations/{$id}
GET list of files in a collection
Depending on the type of record you are asking for you will get a different set of values in each item.
Return to table of contentsFor all records:
- uri
- name
- type
- title
For manuscripts
- support
- institution (id)
- material
- keyword
- language
- content (ids)
- keywords (ids)
- scribe (ids)
- patron (ids)
- donor (ids)
For persons
- occupation
- role
- gender
For places and institutions
- place type (id)
- tabot (id)
For textual and narrative units
- witnesses (id)
- keyword
- author (id)
- language
/api/{collection}/list/xml
Click on link
/api/{collection}/list/json
GET resource data
beside the methods below, for places and institutions geoJSON can be obtained appending .json to the entry url.
https://betamasaheft.eu/institutions/INS0002AAI.json Return to table of contents/api/{id}/json
This is an automatic serialization in json by rest XQ in exist
GET clavis IDs
Check the correct id exists here.
Return to table of contents/api/clavis/all
GET text (DTS APIs)
Check the correct id exists here.
Return to table of contentsWe support all the Distributed Text Services specifications, from the starting endpoint https://betamasaheft.eu/api/dts .
This API is used for the text views in the application.
The DTS implementation is experimental and implements additional non canonical parts.
GET XML text of additions or specific catalogue record parts
This only works for manuscript catalogue records.
Return to table of contents/BetMas/api/otherMssText/{id}/{anchor}
Typically catalogue records will contain text in additions, extras, incipit, explicit and colophon or notes, but there might be more.
Click on link.
GET place data in KML or geoJSON.
This only works for manuscript catalogue records.
Return to table of contents/api/geoJson/places
/api/geoJson/institutions
/api/KML/places/{$id}
get places mentioned in one item
Click on link.
/api/KML/place/{$placeid}
get for one place all its attestations with date if available in the element
Click on link.
There are several other place related queries possible. Please, ask if you need anything in particular.
Search Dillmann lexicon
Search in the Dillmann lexicon works pretty much the same.
Return to table of contents/api/Dillmann/search/{element}?q={searchstring}
Searching in element form a lemma will return the id of that lemma.
-
form
-
sense
-
ref
-
gramGrp
-
lbl
-
pos
-
case
-
cit
-
foreign
GET list of lemmas from Dillmann lexicon
Return to table of contents/api/Dillmann/list/xml
Click on link.
/api/Dillmann/list/json
GET lemma from Dillmann Lexicon
You can see the raw data appending .xml to the lemma you land on. Alternatively a text only version is available appending .txt to your lemma url. These are not served by this API but by an XSLT transformation.
https://betamasaheft.eu/Dillmann/lemma/Lb4b820d2caa64822aaffe29dc1ce0e06 is the html view
https://betamasaheft.eu/Dillmann/lemma/Lb4b820d2caa64822aaffe29dc1ce0e06.xml is the source data
Return to table of contents/api/Dillmann/{id}/txt
return only the entry in txt as in original file (retransformed with xslt)
Click on link.
/api/Dillmann/{id}/teientry
return only the entry in xml
Click on link.
/api/Dillmann/{id}/json
return only the entry in json by restxq
GET IIIF API Manifest
How to get available manifests for manuscripts or collections. Please for a description see the IIIF Prentation API. URIs of canvases and sequences are dereferncable. The collection request will also list available manifests linked to our records.
Return to table of contents/permanent/{$sha}/api/iiif/{$id}/manifest
/iiif/collections
/{$sha}/api/iiif/{$id}/canvas/p{$n}
/api/iiif/{$id}/range/{$rangeId}
/permanent/{$sha}/api/iiif/{$id}/sequence/normal
/iiif/collection/{$institutionid}
/iiif/{$id}/canvas/p{$n}
/{$sha}/api/iiif/{$id}/sequence/normal
/iiif/{$id}/manifest
/iiif/{$id}/sequence/normal
/{$sha}/api/iiif/{$id}/manifest
/iiif/witnesses/{$workID}
/permanent/{$sha}/api/iiif/{$id}/canvas/p{$n}
/api/iiif/collection/{$institutionid}
/api/iiif/{$id}/canvas/p{$n}
/api/iiif/collections
/iiif/{$id}/range/{$rangeId}
/api/iiif/{$id}/sequence/normal
/api/iiif/witnesses/{$workID}
/api/iiif/{$id}/manifest
GET SHINE API
How to navigate the SHINE API (SHINE documentation).
Return to table of contents/api/sections/{$uuid}/content_units
/shine/api/resources/{$uuid}/metadata
/api/resources/{$uuid}/sections
/api/collections/{$uuid}/resources
/shine/api/collections
/shine/api/sections/{$uuid}/content_units
/api/resources/{$uuid}/metadata
/api/collections
/shine/api/resources/{$uuid}/sections
/shine/api/collections/{$uuid}/resources
GET JSON-API
How to navigate the JSON API.
Return to table of contents/api/sections/{$uuid}/content_units
/shine/api/resources/{$uuid}/metadata
/api/resources/{$uuid}/sections
/api/collections/{$uuid}/resources
/shine/api/collections
/shine/api/sections/{$uuid}/content_units
/api/resources/{$uuid}/metadata
/api/collections
/shine/api/resources/{$uuid}/sections
/shine/api/collections/{$uuid}/resources