@assets.route('<STR_LIT>', methods=['<STR_LIT:POST>'])<EOL>def query_ddo():
assert isinstance(request.json, dict), '<STR_LIT>'<EOL>data = request.json<EOL>assert isinstance(data, dict), '<STR_LIT>'<EOL>if '<STR_LIT>' in data:<EOL><INDENT>search_model = QueryModel(query=data.get('<STR_LIT>'), sort=data.get('<STR_LIT>'),<EOL>offset=data.get('<STR_LIT>', <NUM_LIT:100>),<EOL>page=data.get('<STR_LIT>', <NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>search_model = QueryModel(query={}, sort=data.get('<STR_LIT>'),<EOL>offset=data.get('<STR_LIT>', <NUM_LIT:100>),<EOL>page=data.get('<STR_LIT>', <NUM_LIT:1>))<EOL><DEDENT>query_result = dao.query(search_model)<EOL>for i in query_result[<NUM_LIT:0>]:<EOL><INDENT>_sanitize_record(i)<EOL><DEDENT>response = _make_paginate_response(query_result, search_model)<EOL>return Response(json.dumps(response, default=_my_converter), <NUM_LIT:200>,<EOL>content_type='<STR_LIT:application/json>')<EOL>
Get a list of DDOs that match with the executed query.
    ---
    tags:
      - ddo
    consumes:
      - application/json
    parameters:
      - in: body
        name: body
        required: true
        description: Asset metadata.
        schema:
          type: object
          properties:
            query:
              type: string
              description: Query to realize
              example: {"value":1}
            sort:
              type: object
              description: Key or list of keys to sort the result
              example: {"value":1}
            offset:
              type: int
              description: Number of records per page
              example: 100
            page:
              type: int
              description: Page showed
              example: 1
    responses:
      200:
        description: successful action