---
title: "Get the structure of an analysis sets or selection list"
method: GET
path: "/getSetDefinition"
tags: ["Sets"]
---

# Get the structure of an analysis sets or selection list

`GET /getSetDefinition`

Use this API operation to get the structural definition of an analysis sets or selection lists.

## Query parameters

- `setId` integer, required
- `onlyActiveFields` boolean

## Response `200`

The output will be a JSON-encoded object.

For both analysis sets and selection lists, the object will have properties `name` and `fields`. Analysis sets will also have `group` and `indexField`, which might be `null`.

The `fields` value will be an array of objects. These objects are listed in order and describe the fields. Object properties will vary based on the field `type`:

* `date` fields have a `format` property, which is either `date` or `datetime`.

* `numeric` fields all have `decimals`. If this is null, the field holds a floating point value. Calculations have a `formula`, while others have a `default`.

* `select` fields have properties (`listId, listField, listFilter`) that define which selection list the field is based on, and which of list's fields is selected, along with which filter (see the `product` field in the example below).

* `text` fields have a `multiLine` property with a boolean value.

- GetSetDefinitionSchema
  - `name` string
  - `group` string
  - `indexField` string
  - `fields` union[]
    - union
      - FieldsTypeDate
        - `name` string
        - `label` string
        - `abbreviation` string
        - `unit` string, nullable
        - `type` 'date' | 'numeric' | 'select' | 'text'
        - `required` boolean
        - `active` boolean
        - `format` 'date' | 'datetime'
      - FieldsTypeSelect
        - `name` string
        - `label` string
        - `abbreviation` string
        - `unit` string, nullable
        - `type` 'date' | 'numeric' | 'select' | 'text'
        - `required` boolean
        - `active` boolean
        - `listId` integer
        - `listField` string
        - `listFilter` string
      - FieldsTypeNumeric
        - `name` string
        - `label` string
        - `abbreviation` string
        - `unit` string, nullable
        - `type` 'date' | 'numeric' | 'select' | 'text'
        - `required` boolean
        - `active` boolean
        - `decimals` integer, nullable
        - `default` integer
      - FieldsTypeText
        - `name` string
        - `label` string
        - `abbreviation` string
        - `unit` string, nullable
        - `type` 'date' | 'numeric' | 'select' | 'text'
        - `required` boolean
        - `active` boolean
        - `multiLine` boolean, nullable

## Other responses

- `304` — Not Modified
- `400` — Bad Request
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/alisqi/apis/alisqi-api.md) · [All operations](https://skmtc.net/alisqi/apis/alisqi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alisqi/alisqi-api/versions/0b7557342fcf/schema)
