polydb:rest:intro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
polydb:rest:intro [2023/03/24 21:52] – [polyDB REST API] paffenholzpolydb:rest:intro [2023/03/24 21:55] (current) paffenholz
Line 23: Line 23:
     * id     * id
  
-Some examples are below. For a full documentation of all endpoints with examples for data and code see [[https://polymake.org/polytopes/paffenholz/polyDB-rest.html|here]].+Some examples are below. 
  
-==== Obtain info on available collections ====+The full documentation of all endpoints with examples for data and code **[[https://polymake.org/polytopes/paffenholz/polyDB-rest.html|is here]]**.
  
-=== section ===+==== Some examples for the REST API ==== 
 + 
 +=== Obtain info on available collections === 
 + 
 +== section ==
  
 This returns section documentation and a list of subsections and collections in this section: This returns section documentation and a list of subsections and collections in this section:
Line 62: Line 66:
 </code> </code>
  
-=== sections ===+== sections ==
  
 This returns a list of subsections of the given one This returns a list of subsections of the given one
  
-=== collection ===+== collection ==
  
 This prints full information on a collection. The collection is given as  This prints full information on a collection. The collection is given as 
Line 78: Line 82:
 </code> </code>
  
-=== collections ===+== collections ==
  
 This lists all collections contained in a section. This lists all collections contained in a section.
Line 101: Line 105:
 </code> </code>
  
-==== Query Data ====+=== Query Data ===
  
-=== find ===+== find ==
  
 This endpoint does a general query on the given collection and returns a list of the results. You can set the options sort, limit, and skip. However, the query never returns more than 10 entries. This endpoint does a general query on the given collection and returns a list of the results. You can set the options sort, limit, and skip. However, the query never returns more than 10 entries.
Line 113: Line 117:
 will return at most 10 reflexive polytopes with 5 vertices, skipping the first 100 matches. will return at most 10 reflexive polytopes with 5 vertices, skipping the first 100 matches.
  
-=== find_one ===+== find_one ==
  
 This works as find, but returns at most one match. The option limit does not apply here. This works as find, but returns at most one match. The option limit does not apply here.
Line 123: Line 127:
    
  
-=== distinct ===+== distinct ==
  
-=== count ===+== count ==
  
 This counts the number of results that match a given query. Example: This counts the number of results that match a given query. Example:
Line 136: Line 140:
 </code> </code>
  
-=== id ===+== id ==
  
 Returns a single document by its id. Returns a single document by its id.
Line 146: Line 150:
  
  
-==== Obtain the JSON Schema for the data ====+=== Obtain the JSON Schema for the data ===
  
-=== schema ===+== schema ==
  
 Example Example
  • polydb/rest/intro.txt
  • Last modified: 2023/03/24 21:55
  • by paffenholz