Overview

Canonical Text Services is described as follows:

The Canonical Text Services protocol defines interaction between a client and server providing identification of texts and retrieval of canonically cited passages of texts.

The following site was used as a reference.

http://cts.informatik.uni-leipzig.de/Canonical_Text_Service.html

Usage

The following was used as a reference.

https://github.com/cite-architecture/cts_spec/blob/master/md/specification.md

GetCapabilities

A request to check the services supported by the server.

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetCapabilities

<GetCapabilities xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ti="http://chs.harvard.edu/xmlns/cts">
  <request>GetCapabilities</request>
  <reply>
    <TextInventory tiversion="5.0.rc.1">
      <corpuslicense>Public Domain</corpuslicense>
      <corpussource>http://paralleltext.info/data/</corpussource>
      <corpuslanguage>arb,ceb,ces,cym,deu,eng,fin,fra,ita,mya,rus,tgl,ukr</corpuslanguage>
      <corpusname>Parallel Bible Corpus</corpusname>
      <corpusdescription>The Bible corpus contains 1169 unique translations, which have been assigned 906 different ISO-639-3 codes. This CTS instance contains 20 bible translations from PBC that are available as Public Domain.</corpusdescription>
      <textgroup urn="urn:cts:pbc:bible">
        <groupname>bible</groupname>
        <edition urn="urn:cts:pbc:bible.parallel.arb.norm:">
          <title>The Bible in Arabic</title>
          <license>Public Domain</license>
          <source>http://paralleltext.info/data/ retrieved via Canonical Text Service http://cts.informatik.uni-leipzig.de/pbc/cts/</source>
          <publicationDate>1865</publicationDate>
          <language>arb</language>
          <contentType>xml</contentType>
        </edition>
        ...
      </textgroup>
    </TextInventory>
  </reply>
</GetCapabilities>

GetPassage

Retrieves a specific portion of text based on a specified URN (Uniform Resource Name).

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetPassage&urn=urn:cts:pbc:bible.parallel.eng.kingjames:1.3

<GetPassage xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0">
  <request>
    <requestName>GetPassage</requestName>
    <requestUrn>urn:cts:pbc:bible.parallel.eng.kingjames:1.3</requestUrn>
  </request>
  <reply>
    <urn>urn:cts:pbc:bible.parallel.eng.kingjames:1.3</urn>
    <passage>Now the serpent was more subtil than any beast of the field which the LORD God had made ...</passage>
    <license>Public Domain</license>
    <source>http://paralleltext.info/data/ retrieved via Canonical Text Service http://cts.informatik.uni-leipzig.de/pbc/cts/ with CTS URN urn:cts:pbc:bible.parallel.eng.kingjames:1.3</source>
  </reply>
</GetPassage>

GetPassagePlus

Similar to GetPassage, but also retrieves additional metadata (such as bibliographic information).

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetPassagePlus&urn=urn:cts:pbc:bible.parallel.eng.kingjames:1.3

The response includes additional information such as label, groupname, prevnext navigation, and reff (list of citable sub-passages).

GetValidReff

Retrieves a list of valid references within a specified range for a particular text.

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetValidReff&urn=urn:cts:pbc:bible.parallel.eng.kingjames:&level=1

The response returns a list of URNs for each valid reference at the specified level.

GetFirstUrn

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetFirstUrn&urn=urn:cts:pbc:bible.parallel.eng.kingjames:

Returns the first URN in the text.

GetPrevNextUrn

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetPrevNextUrn&urn=urn:cts:pbc:bible.parallel.eng.kingjames:1

Returns the previous and next URNs relative to the specified passage.

GetLabel

http://cts.informatik.uni-leipzig.de/pbc/cts/?request=GetLabel&urn=urn:cts:pbc:bible.parallel.eng.kingjames:1

Returns the label (human-readable title) for the specified passage.

Summary

There may be other request methods available, but we hope this serves as a useful reference.