> 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/trail.md).

# Activity

## Method & Permission

| API          | GET                                              | POST | PUT | PATCH | DELETE |
| ------------ | ------------------------------------------------ | ---- | --- | ----- | ------ |
| Trail List   | Admin, Project Admin, Project Edit, Project View | -    | -   | -     | -      |
| Trail Detail | Admin, Project Admin, Project Edit, Project View | -    | -   | -     | -      |

## Trail List

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

#### Path Parameters

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

#### Query Parameters

| Name       | Type   | Description                                                   |
| ---------- | ------ | ------------------------------------------------------------- |
| row\_\_sid | string | If not provided, the most recent activities will be returned. |

#### Headers

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

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```yaml
# serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 7,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "svyB0a40xf8fuzEJOTY4",
            "name": "Updated Section (Overview) date_updated"
        },
          ...
    ]
}
# serializer = list
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 7,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "icon": "edit",
            "user": {
                "sid": "hknq0a40x42jotyDINS",
                "first_name": "Test",
                "last_name": "Labii",
                "email": "test@labii.com"
            },
            "action": "Updated",
            "field": "Section (Overview) date_updated",
            "date_created": "2020-09-22T22:56:59.337833Z",
            "change_permission": false
        },
          ...
    ]
}
# serializer = detail
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 7,
    "next": null,
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "icon": "edit",
            "row": {
                "sid": "xADG0a40x6702zEJOTY49",
                "name": "EP1055: Test Name 20200922155614"
            },
            "version": {
                "sid": "470c0a40x2bfc26afkpuzE",
                "name": "EP1055: Test Name 20200922155614 (v2)"
            },
            "user": {
                "sid": "hknq0a40x42jotyDINS",
                "first_name": "Test",
                "last_name": "Labii",
                "email": "test@labii.com"
            },
            "action": "Updated",
            "field": "Section (Overview) date_updated",
            "old_data": "2020-09-22 22:56:44.452333+00:00",
            "new_data": "2020-09-22 22:56:59.327526+00:00",
            "date_created": "2020-09-22T22:56:59.337833Z",
            "change_permission": false
        },
          ...
    ]
}
```

{% endtab %}

{% tab title="406 " %}

```
Invalid row__sid (xxx)
```

{% endtab %}
{% endtabs %}

## Trail Detail

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

#### Path Parameters

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

#### Headers

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

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

```yaml
{
    "icon": "edit",
    "row": {
        "sid": "xADG0a40x6702zEJOTY49",
        "name": "EP1055: Test Name 20200922155614"
    },
    "version": {
        "sid": "470c0a40x2bfc26afkpuzE",
        "name": "EP1055: Test Name 20200922155614 (v2)"
    },
    "user": {
        "sid": "hknq0a40x42jotyDINS",
        "first_name": "Test",
        "last_name": "Labii",
        "email": "test@labii.com"
    },
    "action": "Updated",
    "field": "Section (Overview) date_updated",
    "old_data": "2020-09-22 22:56:44.452333+00:00",
    "new_data": "2020-09-22 22:56:59.327526+00:00",
    "date_created": "2020-09-22T22:56:59.337833Z",
    "change_permission": false
}
```

{% endtab %}
{% endtabs %}
