# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.labii.com/api/methods/column.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
