Project

General

Profile

Feature #1275

Updated by Bernhard Koschiček-Krombholz over 3 years ago

As discussed at the [[Meeting_API_2020-06-15|API meeting]], the API need more parameters, so a frontend can used it.   

 *Branch name:* feature_api_pagination 

 First wave parameters: 
 * Pagination -> Seek Method (done) 
 * Filtering (=, !=, <, <=, >, >=, LIKE, IN, AND, OR, AND NOT, OR NOT)(done) 
 * Sorting (done)  

 Second wave parameters: 
 * Real queries:  
 ** show subunits for classes and types #1206 
 ** Give me the entity and all linked entities 
 ** Give me the entity and all subunits of this entity 
 ** Give me the entity and all super types of this entity 
 ** Show only specific entries of entities --> selective query (e.g.: Show only name and geo data)  

 Please change the parameters to your needs.  

 Example of path. 
 <pre><code class="xml"> 
   /class/{class}: 
     get: 
       tags: 
        - Users 
       summary: retrieves a list of geojson representations wich share a specified class code 
       operationId: retrieveEntitiesByClass 
       security: 
         - cookieAuth: []       
       parameters: 
         - in: path 
           name: class 
           description: a cidocCRM class code eg E21 
           required: true 
           schema: 
             type: string 
         - in: query 
           name: limit 
           description: number of geojson representations to be returned 
           schema: 
             type: number 
         - in: query 
           name: column 
           description: the column wich should be sorted and filtered 
           schema: 
             type: string 
         - in: query 
           name: sort 
           description: sort direction asc/desc 
           schema: 
             type: string 
         - in: query 
           name: filter 
           description: filter operator to be applied 
           schema: 
             type: string             
       responses: 
         '200': 
           description: a geojson representation of the specified entities 
           content: 
               application/ld+json: 
                 schema: 
                   $ref: '#/components/schemas/featureCollectionGeoJSON' 
         '404': 
           description: not found 

 </code></pre>

Back