Project

General

Profile

Actions

Feature #1275

closed

API: parameters

Added by Bernhard Koschiček-Krombholz over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Start date:
2020-08-04
Estimated time:
(Total: 0.00 h)

Description

As discussed at the 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: -> Moved to other ticket
  • 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) (done)-
    • Give me a place and all actors linked to that place through events (could be also more specific if needed)

Please change the parameters to your needs.

Example of path.

  /query/:
    get:
      tags:
      - Users
      summary: retrieves a list of geojson based on multiple query parameters
      operationId: retrieveQuery
      security: 
      - cookieAuth: []
      parameters: 
      - in: query
        name: entities[]
        description: get specific entities by id
        schema:
          type: number 
      - in: query
        name: classes[]
        description: get specific classes by cidoc class code e.g. E18
        schema:
          type: string
      - in: query
        name: items[]
        description: get specific menu items e.g. actor, place
        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
          enum:
            - id
            -  class_code
            -  name
            -  description
            -  created
            -  modified
            -  system_type
            -  begin_from
            -  begin_to
            -  end_from
            -  end_to
      - in: query
        name: sort
        description: sort direction asc/desc
        schema:
          type: string
          enum:
            - asc
            - desc
      - in: query
        name: filter
        description: filter operator to be applied
        schema:
          type: string    
      - in: query
        name: first
        description: first id of a page
        schema:
          type: number
      - in: query
        name: last
        description: last id of a page
        schema:
          type: number
      - in: query
        name: show
        description: select which key should be shown e.g. when, types, relations, names, links, geometry, depictions, not
        schema:
          type: string
          enum:
            - when
            - types
            - relations
            - names
            - links
            - geometry
            - depictions
            - not
      responses:
        '200':
          description: a geojson representation of the specified entities
          content:
              application/ld+json:
                schema:
                  $ref: '#/components/schemas/featureCollectionGeoJSON'
        '404':
          description: not found


Subtasks 1 (0 open1 closed)

Feature #1318: API: Selective requestsClosedBernhard Koschiček-Krombholz2020-08-04Actions
Actions

Also available in: Atom PDF