Print

Print


Hi Chiara,

The following requests should work

http://localhost:5000/api/cts/?request=GetCapabilities

This returns the CTS Inventory of texts which are available in the 
repository.

You can then find urns for individual editions and translations in that 
response, and feed these to the GetValidReff request

http://localhost:5000/api/cts/?request=GetValidReff&urn= 
urn:cts:greekLit:tlg0012.tlg002.perseus-grc2

This returns a list of passages

You can drill down to lower levels by adding a level parameter

http://localhost:5000/api/cts/?request=GetValidReff&urn=urn:cts:greekLit:tlg0012.tlg002.perseus-grc2&level=2

(the number of levels is identified in the CTS Inventory metadata for 
the edition)

And finally retrieve text by requesting a passage urn (individual or 
range). e.g.

http://localhost:5000/api/cts/?request=GetPassage&urn=urn:cts:greekLit:tlg0012.tlg002.perseus-grc2:1.1-1.10

(The following quick guide I wrote up recently for the CTS Handle 
project might also be helpful:
https://github.com/rpidproject/cts-handles/blob/master/sample_cts_request_response.md

Hope this helps,

Best
Bridget


On 05/23/2017 02:10 PM, Chiara Salvagni wrote:
> On Sun, 21 May 2017 23:44:34 +0100, Chiara Salvagni <[log in to unmask]> wrote:
> Dear Clérice Thibault and dear all,
> I have been looking at the http://localhost:5000/api/cts which should allow us to browse, and I still get the error:
> <CTSError><type>MissingParameter</type><message> Request missing one or more required parameters </message><documentation>https://capitains.github.io/pages/vocabulary#cts-concepts-equivalency-table</documentation><possibleRequests><request><param name="request">GetCapabilities</param><legend>Retrieve a list of available resources in the API</legend></request><request><param name="request">GetPassage</param><param name="urn"/><legend>Retrieve a passage of a text identified by given urn</legend></request><request><param name="request">GetPassagePlus</param><param name="urn"/><legend>Retrieve a passage of a text identified by given urn with its metadata (Previous, next URNs, Label)</legend></request><request><param name="request">GetPrevNextUrn</param><param name="urn"/><legend>Retrieve previous and following passage of a given urn</legend></request><request><param name="request">GetValidReff</param><param name="urn"/><param name="level"/><legend>Retrieve children reference of given URN at given level. For range, level=0 will retrieve same level passage inside the range</legend></request><request><param name="request">GetFirstUrn</param><param name="urn"/><legend>Retrieve the first child of given URN</legend></request><request><param name="request">GetLabel</param><param name="urn"/><legend>Retrieve metadata about given edition or translation identified by its URN</legend></request></possibleRequests></CTSError>.
> I looked at the CTS specifications here, https://github.com/cite-architecture/cts_spec/blob/master/md/specification.md, and at the CTS files inside the release you pointed out to us. Am I understanding right, that it is there I have to look, so as to solve the error message?
> Thanks again.
> Chiara Salvagni
>
>> Dear Clérice Thibault,
>> thanks a lot. Now I understood everything. The interface http://localhost:5000/ works fine and I can see everything. I'll look at the other, the http://localhost:5000/api/cts and figure out what the CTSError I am seeing means and is. I would like to know how this project will go on.
>> Chiara Salvagni
>>
>> On Sun, 21 May 2017 18:32:51 +0200, Thibault Clérice <[log in to unmask]> wrote:
>>
>>> Dear Chiara and members of the list,
>>>
>>> Unfortunately not all the texts of Perseus have been converted to
>>> CapiTainS guidelines for the moment. To have only texts which pass the
>>> guidelines, you'll have to download the release.tar.gz that are available
>>> in each given repositories such as
>>> https://github.com/PerseusDL/canonical-latinLit/releases/download/0.0.12/release.tar.gz
>>> . There is two part of the server, one is the CTS API (and some other APIs
>>> like a DTS skeleton), the second is the UI which has no XSLT whatsoever but
>>> allows you to browse at least :) It should be possible to provide one but I
>>> would really need some support on making the app-building mores streamline
>>> before going there. If any of you has some spare time ;)
>>>
>>> As for the directories, they are loaded together but not as "browsable"
>>> collections . They are just merged. Any other system would make it quite
>>> more complex for the end user at the moment :)
>>>
>>> Best,
>>> Thibault
>>>
>>> 2017-05-21 17:26 GMT+02:00 Chiara Salvagni <[log in to unmask]>:
>>>
>>>> Dear Clérice Thibault,
>>>> I did as you suggested and, after a few testings, I managed to change the
>>>> file into an exec. I load a directory and I run the server. The results are
>>>> that certain files are said to be not present, in other cases there are
>>>> errors parsing and in others it does say: 'does not accept parsing at some
>>>> level (most probably citation)'. When I click on open server I obtain this
>>>> error: "CTS error thrown MissingParameter for (request missing one or more
>>>> required parameters)' and I open a xml page with no stylesheet information
>>>> available. I can see a page only if I open the link:
>>>> http://localhost:5000/. In this page I see a default collection with some
>>>> Greek and Latin texts. Should I manage to see the directory I loaded?
>>>> Thanks for your help.
>>>> Chiara Salvagni
>>>>