# Version

## Method & Permission

| API            | GET                                              | POST | PUT | PATCH                           | DELETE |
| -------------- | ------------------------------------------------ | ---- | --- | ------------------------------- | ------ |
| Version List   | Admin, Project Admin, Project Edit, Project View | -    | -   | -                               | -      |
| Version Detail | Admin, Project Admin, Project Edit, Project View | -    | -   | Project Admin\*, Project Edit\* | -      |

\*Only the `commit` message can be updated.

## Version List

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

#### Path Parameters

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

#### Query Parameters

| Name       | Type    | Description                                |
| ---------- | ------- | ------------------------------------------ |
| dataonly   | boolean | Use dataonly to return the row data object |
| row\_\_sid | string  |                                            |

#### Headers

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

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

```yaml
#serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 4,
    "count": 33,
    "next": "xxx",
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "EP625: Test Name 20200525133408 (33)"
        },
        ...
    ]
}
#serializer = list
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 4,
    "count": 33,
    "next": "xxx",
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "EP625: Test Name 20200525133408 (33)",
            "hash": "xxx",
            "previousHash": "xxx",
            "version": 33,
            "activity_message": "xxx",
            "commit": null,
            "is_valid": true,
            "updated_by": "Yonggan Wu",
            "date_created": "2020-06-12T18:54:06.314767Z",
            "change_permission": true
        }
        ...
    ]
}
#serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 4,
    "count": 33,
    "next": "xxx",
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "EP625: Test Name 20200525133408 (33)",
            "hash": "xxx",
            "data": {},
            "previousHash": "xxx",
            "version": 33,
            "activity_message": "xxx",
            "commit": null,
            "is_valid": true,
            "updated_by": "Yonggan Wu",
            "date_created": "2020-06-12T18:54:06.314767Z",
            "change_permission": true
        },
        ...
    ]
}
```

{% endtab %}
{% endtabs %}

## Version Detail

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

#### Path Parameters

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

#### Headers

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

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

```yaml
{
    "sid": "xxx",
    "hash": "VGd4bzZhZmVhMzBkOWZlMmViNTdmZDE3YzBhOWVlMTUwYmMzSEZMcQ__",
    "previousHash": "WFFWbGRlMzViMmM1MzViZmM0MTdmYjU2N2FmZWFkYmFjOGJkWHFRSw__",
    "version": 8,
    "data": {
        ...
    }
    "activity_message": "Updated data of Section (Files (No Preview)) from None to {\"files\": [{\"sid\": \"orux0a40x239qvAFKPUZ\", \"name\": \" FL143: FL154_ Small Workbook.xlsx (v3)\"}, {\"sid\": \"mpsv0a40x237otyDINSX\", \"name\": \" FL141: 2015-5-5 lib pool.xlsx (v3)\"}, {\"sid\": \"ehkn0a40x7dglqvAFKP\", \"name\": \" FL8: linkers and templates for subset-2.xlsx (v3)\"}]}",
    "updated_by": {
        "sid": "xxx",
        "first_name": "xxx",
        "last_name": "xxx",
        "email": "xxx@labii.com"
    },
    "date_updated": "2018-07-27T07:10:57.293464Z",
    "date_created": "2018-07-27T07:10:57.279388Z",
    "change_permission": false
}
```

{% endtab %}
{% endtabs %}

## Version Detail

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

#### Path Parameters

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

#### Headers

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

#### Request Body

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| commit | string |             |

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

```
{
    "sid": "xxx",
    "hash": "VGd4bzZhZmVhMzBkOWZlMmViNTdmZDE3YzBhOWVlMTUwYmMzSEZMcQ__",
    "previousHash": "WFFWbGRlMzViMmM1MzViZmM0MTdmYjU2N2FmZWFkYmFjOGJkWHFRSw__",
    "version": 8,
    "data": {
        ...
    }
    "activity_message": "Updated data of Section (Files (No Preview)) from None to {\"files\": [{\"sid\": \"orux0a40x239qvAFKPUZ\", \"name\": \" FL143: FL154_ Small Workbook.xlsx (v3)\"}, {\"sid\": \"mpsv0a40x237otyDINSX\", \"name\": \" FL141: 2015-5-5 lib pool.xlsx (v3)\"}, {\"sid\": \"ehkn0a40x7dglqvAFKP\", \"name\": \" FL8: linkers and templates for subset-2.xlsx (v3)\"}]}",
    "updated_by": {
        "sid": "xxx",
        "first_name": "xxx",
        "last_name": "xxx",
        "email": "xxx@labii.com"
    },
    "date_updated": "2018-07-27T07:10:57.293464Z",
    "date_created": "2018-07-27T07:10:57.279388Z",
    "change_permission": false
}
```

{% 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/version.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.
