# List filter values

URL: https://docs.dixa.io/openapi/dixa-api/beta/intelligence/getintelligencefiltersattributevalues

List the values you can filter on for an attribute, such as all queues or all tags. Deactivated agents, queues and tags are included and marked with `deactivated: true`.

## GET /beta/intelligence/filters/{attribute}/values

- Server: https://dev.dixa.io
- Auth: `Authorization: <API token>` header

### Request example

```bash
curl -X GET 'https://dev.dixa.io/beta/intelligence/filters/{attribute}/values?pageLimit=50' \
  -H 'Authorization: <API token>'
```

### Response examples

#### 200 The values of the filter attribute

Entity values (agent):

```json
{
  "data": [
    {
      "id": "a4f1c0b2-6d38-4e91-8f27-1b5d9c3e7a04",
      "label": "Joe Bloggs",
      "deactivated": false
    },
    {
      "id": "c81d4e2a-95b7-4c60-a3f8-2e6a7d09b415",
      "label": "Amara Okafor",
      "deactivated": false
    },
    {
      "id": "e6b2a704-3f19-4d82-9c5b-4a8e1f2d7c36",
      "label": "Sam Petrov",
      "deactivated": true
    }
  ],
  "meta": {
    "next": "/beta/intelligence/filters/agent/values?pageKey=eyJvZmZzZXQiOjUwLCJsaW1pdCI6NTB9&pageLimit=50"
  }
}
```

Enum values (channel):

```json
{
  "data": [
    {
      "id": "ContactForm",
      "label": "Contact Form"
    },
    {
      "id": "Email",
      "label": "Email"
    },
    {
      "id": "PstnPhone",
      "label": "Phone"
    }
  ]
}
```

Last page:

```json
{
  "data": [
    {
      "id": "e6b2a704-3f19-4d82-9c5b-4a8e1f2d7c36",
      "label": "Sam Petrov",
      "deactivated": true
    }
  ],
  "meta": {
    "previous": "/beta/intelligence/filters/agent/values?pageKey=eyJvZmZzZXQiOjAsImxpbWl0Ijo1MH0&pageLimit=50"
  }
}
```

#### 400

```json
{
  "message": "Decoding failure in request"
}
```

#### 404 An entity in this request could not be found

```json
{
  "message": "The requested resource could not be found"
}
```

#### 500 Internal failure during request processing

```json
{
  "message": "There was an internal server error while processing the request"
}
```

## OpenAPI definition

The operation and the schemas used, from the full spec at https://docs.dixa.io/openapi-specs/dixa-beta.yaml. Request and response examples are above.

```yaml
openapi: 3.0.3
info:
  title: Dixa API
  version: beta
servers:
  - url: https://dev.dixa.io
security:
  - ApiKeyAuth: []
paths:
  /beta/intelligence/filters/{attribute}/values:
    get:
      tags:
        - Intelligence
      summary: List filter values
      description: "List the values you can filter on for an attribute, such as all
        queues or all tags. Deactivated agents, queues and tags are included and
        marked with `deactivated: true`."
      operationId: getIntelligenceFiltersAttributeValues
      parameters:
        - name: attribute
          in: path
          description: A filter `attribute` from List metrics or List records
          required: true
          schema:
            type: string
        - name: pageKey
          in: query
          description: The key of the page to fetch. To page through the results, call the
            link in `meta.next` or `meta.previous` of the previous response,
            which already carries this key.
          required: false
          schema:
            type: string
        - name: pageLimit
          in: query
          description: The number of entries per page, up to 1000. Defaults to 50, or to
            the page size of `pageKey` when one is given.
          required: false
          schema:
            default: 50
            type: integer
            format: int32
      responses:
        "200":
          description: The values of the filter attribute
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IntelligenceFilterValuePage"
        "400":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadRequest"
        "404":
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFound"
        "500":
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ServerError"
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
  schemas:
    IntelligenceFilterValuePage:
      title: IntelligenceFilterValuePage
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/IntelligenceFilterValue"
        meta:
          $ref: "#/components/schemas/PaginationLinks"
    IntelligenceFilterValue:
      title: IntelligenceFilterValue
      description: A value of a filter attribute
      type: object
      required:
        - id
      properties:
        id:
          description: The value to use in a filter's `values`
          type: string
        label:
          description: The display name
          type: string
        deactivated:
          description: Whether the agent, queue, tag or SLA policy is deactivated. Not set
            for other attributes
          type: boolean
    PaginationLinks:
      title: PaginationLinks
      type: object
      properties:
        previous:
          description: url
          type: string
        next:
          description: url
          type: string
    BadRequest:
      title: BadRequest
      type: object
      required:
        - message
      properties:
        message:
          type: string
    NotFound:
      title: NotFound
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ServerError:
      title: ServerError
      type: object
      required:
        - message
      properties:
        message:
          type: string
```
