Last modified 3 years ago
Retrieving names of documents
Method
- URL: /names/getDocNames
- Method: GET
- Query parameters:
- numResuls - max number of results to be returned (default: -1, which means all possible results)
- startFrom - starting from N-th result (default: 1, start from the first)
- Returns: text/xml
- Description: returns XML documents names in the TNTBase repository.
Example
- URL: http://alpha.tntbase.mathweb.org:8080/tntbase/ai-mashup/restful/names/getDocNames?startFrom=3&numResults=5
- Method: GET
- Result:
<tnt:results xmlns:tnt="http://tntbase.mathweb.org/ns" startFrom="3" numResults="5"> <tnt:docname>/abduction/en/diagnosis.omdoc</tnt:docname> <tnt:docname>/abduction/en/weighted-simpl.omdoc</tnt:docname> <tnt:docname>/abduction/en/chained.omdoc</tnt:docname> <tnt:docname>/abduction/en/def.omdoc</tnt:docname> <tnt:docname>/abduction/en/inference.omdoc</tnt:docname> </tnt:results>
Method
- URL: /names/getDocNames/{path in the repository}
- Method: GET
- Query parameters:
- numResults: max number of results to be returned
- numResults: starting from N-th result
- recursive (true or false): whether we want to go to the child directories of the {path in the repository} (default: false)
- Returns: text/xml
- Description: returns XML documents names in the TNTBase repository. If recursive parameter is set to false, then we can use simple regexp expressions, like *,? or which stands for all child directories. If recursive parameter is set to true then TNTBase lists names of documents in the provided folder and its subfolders
Example
- URL: http://alpha.tntbase.mathweb.org:8080/tntbase/ai-mashup/restful/names/getDocNames/*oms*//?numResults=4
- Method: GET
- Result: Get all documents' names in root folders which have oms in the middle and all their sub-folders. Moreover, return only two results starting from the first
<tnt:results xmlns:tnt="http://tntbase.mathweb.org/ns" startFrom="1" numResults="3"> <tnt:docname>/comsem/en/books.omdoc</tnt:docname> <tnt:docname>/comsem/en/plot.omdoc</tnt:docname> <tnt:docname>/comsem/en/all.omdoc</tnt:docname> </tnt:results>
