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

# Widget

## Method & Permission

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

## Widget List

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

#### Path Parameters

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

#### Headers

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

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

```yaml
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 3,
    "count": 22,
    "next": null,
    "previous": null,
    "add_permission": false,
    "results": [
        {
            "sid": "xxx",
            "icon": "text_fields",
            "name": "Plain Text",
            "subscription_price": "Free",
            "PPU_price": "Free",
            "notes": "Add plain text, with markdown support",
            "usecase": "xxx",
            "related_to": "rich text",
            "allow_multiple": true,
            "is_readonly": false,
            "is_public": true,
            "component___status___WidgetActive": true,
            "change_permission": true
        },
        ...
    ]
}
```

{% endtab %}

{% tab title="401 " %}

```
Authentication credentials were not provided.
```

{% endtab %}

{% tab title="403 " %}

```
You do not have permission to perform this action.
```

{% endtab %}

{% tab title="406 " %}

```
Wrong id - the provided sid is not correct
Wrong level - the provided level is not acceptable
```

{% endtab %}
{% endtabs %}

## Widget Detail

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

#### Path Parameters

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

#### Headers

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

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

```yaml
{
    "sid": "xxx",
    "icon": "text_fields",
    "name": "Plain Text",
    "subscription_price": "Free",
    "PPU_price": "Free",
    "notes": "Add plain text, with markdown support",
    "component___status___WidgetActive": false,
    "description": "Use this widget to add text with a simple editor. The typical application is Results, Steps, Overview, Description, et.al. The editor also supports Markdown.",
    "instruction": "Markdown is optional, to use Markdown, read more about markdown at https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. <br>\r\n## - Heading<br>\r\n* Unordered list<br>\r\n1. Ordered list<br>\r\nEmphasis, aka italics, with *asterisks* or _underscores_.<br>\r\nStrong emphasis, aka bold, with **asterisks** or __underscores__.<br>\r\nCombined emphasis with **asterisks and _underscores_**.<br>\r\nStrikethrough uses two tildes. ~~Scratch this.~~<br>",
    "usecase": "soem application",
    "related_to": "rich text",
    "apply_to": "Substance,Document,File",
    "allow_multiple": true,
    "is_readonly": false,
    "is_archived": false,
    "is_public": true,
    "screenshot_1": ""
    "screenshot_1": ""
    "date_updated": "2018-07-22T20:25:12.008598Z",
    "date_created": "2018-01-06T19:13:20.282546Z"
}
```

{% endtab %}

{% tab title="401 " %}

```
Authentication credentials were not provided.
```

{% endtab %}

{% tab title="403 " %}

```
You do not have permission to perform this action.
```

{% endtab %}

{% tab title="406 " %}

```
Wrong id - the provided sid is not correct
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.labii.com/api/methods/widget.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
