> For the complete documentation index, see [llms.txt](https://docs.labii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.labii.com/api/methods/column.md).

# Column

## Method & Permission

| API           | GET           | POST  | PUT | PATCH | DELETE |
| ------------- | ------------- | ----- | --- | ----- | ------ |
| Column List   | Admin, Member | Admin | -   | -     | -      |
| Column Detail | Admin, Member | -     | -   | Admin | -      |

## Column List

<mark style="color:blue;">`GET`</mark> `{{ base_url }} /tables/column/list/{level}/{sid}/{serializer}/`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| level      | string | organization     |
| sid        | string | organization sid |
| serializer | string |                  |

#### Query Parameters

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| table\_\_sid | string |             |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

{% tabs %}
{% tab title="200 " %}

```yaml
# serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 7,
    "count": 1,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "date_start"
        },
        ...
    ]
}
# serializer = list
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 7,
    "count": 1,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "date_start",
            "description": "The start date of the expriment.",
            "widget": {
                "sid": "xxx",
                "name": "Date",
                "documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
            },
            "default_value": null,
            "is_required": true,
            "is_hidden": false,
            "is_archived": false,
            "order": 1,
            "table": {
                "sid": "xxx",
                "name": "experiments"
            },
            "change_permission": true
        },
        ...
    ]
}
# serializer = detail
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 7,
    "count": 1,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "date_start",
            "name_system": null,
            "description": "The start date of the expriment.",
            "widget": {
                "sid": "xxx",
                "name": "Date",
                "documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
            },
            "default_value": null,
            "order": 1,
            "is_required": true,
            "is_hidden": false,
            "metadata": {
                
            },
            "table": {
                "sid": "xxx",
                "name": "experiments"
            },
            "is_archived": false,
            "date_created": "2020-05-25T00:35:21.253211Z",
            "change_permission": true
        },
        ...
    ]
}
```

{% endtab %}
{% endtabs %}

## Column List

<mark style="color:green;">`POST`</mark> `{{ base_url }} /tables/column/list/{level}/{sid}/{serializer}/`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| level      | string | organization     |
| sid        | string | organization sid |
| serializer | string |                  |

#### Query Parameters

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| table\_\_sid | string | table sid   |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

#### Request Body

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| name           | string  |             |
| description    | string  |             |
| data\_type     | string  |             |
| default\_value | string  |             |
| is\_required   | boolean |             |
| is\_hidded     | boolean |             |
| is\_archived   | boolean |             |

{% tabs %}
{% tab title="201 " %}

```yaml
{
    "sid": "xxx",
    "name": "date_start",
    "name_system": null,
    "description": "The start date of the expriment.",
    "widget": {
        "sid": "xxx",
        "name": "Date",
        "documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
    },
    "default_value": null,
    "order": 1,
    "is_required": true,
    "is_hidden": false,
    "metadata": {
        
    },
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "is_archived": false,
    "date_created": "2020-05-25T00:35:21.253211Z",
    "change_permission": true
}
```

{% endtab %}

{% tab title="406 " %}

```
Error: Widget is not valid!
```

{% endtab %}
{% endtabs %}

## Column Detail

<mark style="color:blue;">`GET`</mark> `{{ base_url }} /tables/column/detail/{sid}/`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| sid  | string |             |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

{% tabs %}
{% tab title="200 " %}

```yaml
{
    "sid": "xxx",
    "name": "date_start",
    "name_system": null,
    "description": "The start date of the expriment.",
    "widget": {
        "sid": "xxx",
        "name": "Date",
        "documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
    },
    "default_value": null,
    "order": 1,
    "is_required": true,
    "is_hidden": false,
    "metadata": {
        
    },
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "is_archived": false,
    "date_created": "2020-05-25T00:35:21.253211Z",
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Column Detail

<mark style="color:purple;">`PATCH`</mark> `{{ base_url }} /tables/column/detail/{sid}/`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| sid  | string |             |

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

#### Request Body

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| name           | string  |             |
| description    | string  |             |
| date\_type     | string  |             |
| default\_value | string  |             |
| is\_required   | boolean |             |
| is\_hidden     | boolean |             |
| is\_archived   | boolean |             |

{% tabs %}
{% tab title="200 " %}

```yaml
{
    "sid": "xxx",
    "name": "date_start",
    "name_system": null,
    "description": "The start date of the expriment.",
    "widget": {
        "sid": "xxx",
        "name": "Date",
        "documentation_url": "https://docs.labii.com/widgets/column-widgets#date"
    },
    "default_value": null,
    "order": 1,
    "is_required": true,
    "is_hidden": false,
    "metadata": {
        
    },
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "is_archived": false,
    "date_created": "2020-05-25T00:35:21.253211Z",
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}
