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


---

# 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/trail.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.
