Digital Syriac Corpus

Srophé Application : Documentation

API documentation

Available APIs

  • Search API
  • Geographic API
  • OAI-PMH Provider API

Search API

Base url: http://syriaca.org/api/search Method: GET Description: Performs a simple keyword search across all Syriaca.org collections. Provides results as JSON.

Path:

  • /persName
  • /placeName
  • /title
  • /author
  • /desc
  • /note
  • /event
  • /body

Parameters: q : Accepts simple text string.

collection : Limits by collection name:

  • Gateway to the Syriac Saints
  • The Syriac Biographical Dictionary
  • A Guide to Syriac Authors
  • Qadishe: A Guide to the Syriac Saints
  • The Syriac Gazetteer
  • Bibliotheca Hagiographica Syriaca Electronica
  • SPEAR: Syriac Persons, Events, and Relations

lang : Limits by xml:lang attribute.

author : Accepts simple text string. Used only with '/title' search.

examples

/api/search/persName?q=aaron&collection=The Syriac Biographical Dictionary /api/search/placeName?q=edessa /api/title?q=mary&author=ephrem /api/search/title?q=mari&lang=fr

Example output

[
    {
        "id": "http://syriaca.org/work/1002",
        "title": "Mary Mother of God (text)"
    },
    {
        "id": "http://syriaca.org/work/1001",
        "title": "Mary Mother of God (text)"
    },
    {
        "id": "http://syriaca.org/work/1000",
        "title": "Mary Mother of God (text)"
    }
]

Geographic API

Base url: http://syriaca.org/api/geo Method: GET Description: returns geographic points as geoJSON or KML

Path

  • /json
  • /kml

OAI-PMH Provider API

Base url: http://syriaca.org/api/oai Method: GET Description: Full OAI-PMH documentation can be found: http://www.openarchives.org/OAI/2.0/openarchivesprotocol.htm

Parameters verb : OAI-PMH verb. identifier : Syriaca.org record identifier. ex: http://syriaca.org/place/78 from : Date to start harvesting from. Uses publication/last modified date of record. until : Date to end harvesting from. Uses publication/last modified date of record. set : Syriaca.org sets are based on Syriaca.org submodules. Use verb=ListSets to view available sets. resumptionToken : Where to start results list. metadataPrefix : What type of data to return. Syriaca.org currently supports OAI_DC and TEI. Use values: oai_dc or tei

examples

http://syriaca.org/api/oai.xql?verb=ListSets
http://syriaca.org/api/oai.xql?verb=ListRecords&metadataPrefix=oai_dc
http://syriaca.org/api/oai.xql?verb=ListRecords&metadataPrefix=tei
http://syriaca.org/api/oai.xql?verb=GetRecord&identifier=http://syriaca.org/place/78

Troubleshooting APIs

If the API endpoints are not running, you may need to run the following in eXide:

xquery version "3.0";
import module namespace xrest="http://exquery.org/ns/restxq/exist" at "java:org.exist.extensions.exquery.restxq.impl.xquery.exist.ExistRestXqModule";

xrest:register-module(xs:anyURI('/db/apps/srophe/modules/rest.xqm'))