> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Browse Questions

> A `GET` to the `/questions` endpoint allows your application to retrieve all question records.

## Filtering

<Info>
  This endpoint accepts `filter` and `sort` query parameters. See [Filtering, sorting, and search](/dev-guides/core-setup/filtering-and-sorting) for paging and for the shared `search_with`, `custom_field`, and `json_contains` filters.
</Info>

### Examples

<CodeGroup>
  ```bash Exact match theme={null}
  curl -X GET "https://api.[tenant].getomneo.com/api/v3/questions?filter[handle]={handle}" \
    -H "Authorization: Bearer ${TOKEN}"
  ```

  ```bash Only rows with a value theme={null}
  curl -X GET "https://api.[tenant].getomneo.com/api/v3/questions?filter[handle][nullable]=0" \
    -H "Authorization: Bearer ${TOKEN}"
  ```
</CodeGroup>

### Operators

| Operator | Meaning | Example |
| - | - | - |
| `eq` | Equal to. Applied when you give no operator. | `filter[handle]={handle}` |
| `ne` | Not equal to. | `filter[handle][ne]={handle}` |
| `gt` | Greater than. | `filter[handle][gt]={handle}` |
| `gte` | Greater than or equal to. | `filter[handle][gte]={handle}` |
| `lt` | Less than. | `filter[handle][lt]={other-handle}` |
| `lte` | Less than or equal to. | `filter[handle][lte]={other-handle}` |
| `in` | Matches any value in a comma separated list. | `filter[current_version_id][in]=123,456` |
| `not_in` | Excludes every value in a comma separated list. | `filter[current_version_id][not_in]=123,456` |
| `nullable` | `1` returns records where the attribute is empty. Any other value returns records where it is set. | `filter[handle][nullable]=1` |

The `not_has` operator applies to related attributes, which this endpoint does not have.

### Filter attributes

| Attribute | Attribute | Attribute |
| - | - | - |
| `handle` | `current_version_id` | `name` |
| `description` | `is_system` | `is_active` |
| `meta` | `link_type` | `link_target` |
| `link_write_policy` | | |

Each attribute above is also a valid `sort` key, for example `?sort=-handle` for descending order.

### Custom field filters

Question records carry custom fields, so this endpoint also accepts `filter[custom_field][namespace:handle]`.

```bash theme={null}
curl -X GET "https://api.[tenant].getomneo.com/api/v3/questions?filter[custom_field][{namespace}:{handle}]={value}" \
  -H "Authorization: Bearer ${TOKEN}"
```


## OpenAPI

````yaml get /v3/questions
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/questions:
    get:
      tags:
        - Question
      summary: Browse Questions
      description: >-
        A `GET` to the `/questions` endpoint allows your application to retrieve
        all question records.
      operationId: questions.index
      parameters:
        - name: page[size]
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Array of `Question`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Question'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
components:
  schemas:
    Question:
      type: object
      properties:
        id:
          type: integer
        handle:
          type: string
        name:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        is_system:
          type: boolean
        is_active:
          type: boolean
        meta:
          type:
            - array
            - 'null'
          items: {}
        link_type:
          type: string
        link_target:
          type:
            - string
            - 'null'
        link_write_policy:
          type:
            - string
            - 'null'
        is_live:
          type: boolean
        current_version:
          $ref: '#/components/schemas/QuestionVersion'
        versions:
          type: array
          items:
            $ref: '#/components/schemas/QuestionVersion'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - handle
        - name
        - description
        - is_system
        - is_active
        - meta
        - link_type
        - link_target
        - link_write_policy
        - created_at
        - updated_at
      title: Question
    QuestionVersion:
      type: object
      properties:
        id:
          type: integer
        question_id:
          type: integer
        version:
          type: integer
        label:
          type: string
        description:
          type:
            - string
            - 'null'
        help_text:
          type:
            - string
            - 'null'
        icon:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        type:
          type: string
        options:
          type:
            - array
            - 'null'
          items: {}
        validation:
          type:
            - array
            - 'null'
          items: {}
        default_value:
          type:
            - array
            - 'null'
          items: {}
        live_from:
          type: string
        live_to:
          type: string
        answer_ttl_days:
          type:
            - integer
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - question_id
        - version
        - label
        - description
        - help_text
        - icon
        - image_url
        - type
        - options
        - validation
        - default_value
        - live_from
        - live_to
        - answer_ttl_days
        - created_at
        - updated_at
      title: QuestionVersion
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.