---
title: "QueryType"
url: "https://apiportal-qa.np.six-group.com/apis/simulator-ch-qa-v1/versions/c729661a-062a-4141-9704-f637226fa5f0/schemas/QueryType"
---

> Full API specification: https://apiportal-qa.np.six-group.com/apis/simulator-ch-qa-v1/versions/c729661a-062a-4141-9704-f637226fa5f0.md

# QueryType

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: DCleaR - Risk Simulator API - v1
  version: 1.0.0
servers:
  - url: https://api-qa.np.six-group.com/clearing/risk/simulator/dev/v1
  - url: https://api-qa.np.p2p.six-group.com/clearing/risk/simulator/dev/v1
  - url: https://api-qa.np.fip.six-group.com/clearing/risk/simulator/dev/v1
components:
  schemas:
    FilterType:
      type: object
      properties:
        attribute:
          type: string
          description: Name of the attribute to be restricted, filtered or searched
          example: sessionDate
        values:
          type: array
          description: Value of the filter or restriction done.
          example:
            - "20200101"
            - "20200102"
          items:
            type: string
    RestrictionRootType:
      required:
        - operator
      type: object
      properties:
        attribute:
          type: string
          description: Name of the attribute to be restricted, filtered or searched
          example: high
        type:
          type: string
          description: Type of the value to be searched. This is used to validate the
            transformation done in the backend once the list is received
          example: decimal
          enum:
            - integer
            - decimal
            - string
            - boolean
        operator:
          type: string
          description: Operator applied in the value comparision.
          example: and
          enum:
            - and
            - or
        values:
          type: array
          description: List of restrictions to be applied with the operator in the attribute
          items:
            $ref: "#/components/schemas/RestrictionType"
    RestrictionType:
      type: object
      properties:
        restriction:
          type: string
          description: Type of restriction to be set in the search, if applies
          example: lt
          enum:
            - lt
            - lte
            - gt
            - gte
            - eqt
            - neqt
            - like
        value:
          type: string
          description: Value of the filter or restriction done.
          example: "2.3"
    QueryType:
      type: object
      properties:
        filters:
          type: array
          description: Filters restricting the search. All of the values in the Array
            represent AND operation.
          items:
            $ref: "#/components/schemas/FilterType"
        restrictions:
          type: array
          description: List of restrictions applied to the collection
          items:
            $ref: "#/components/schemas/RestrictionRootType"
```
