# Step

## Method & Permission

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

## Step List

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

#### Path Parameters

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

#### Query Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| widget\_\_sid | string |             |

#### Headers

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

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

```yaml
# serializer = name
{
    "page_size": 1,
    "page_number": 1,
    "page_count": 5,
    "count": 5,
    "next": "xxx",
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "Create an experiment note"
        }
    ]
}
# serializer = list
{
    "page_size": 1,
    "page_number": 1,
    "page_count": 5,
    "count": 5,
    "next": "xxx",
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "name": "Create an experiment note",
            "parent": null,
            "redirect_to": null,
            "color": "Grey",
            "workflow": {
                "sid": "xxx",
                "name": "Plan an experiment",
                "description": "This workflow describes what you need to do before start an experiment."
            },
            "table": {
                "sid": "xxx",
                "name": "experiments"
            },
            "change_permission": true
        }
    ]
}
# serializer = detail
{
    "page_size": 1,
    "page_number": 1,
    "page_count": 5,
    "count": 5,
    "next": "xxx",
    "previous": null,
    "add_permission": true,
    "results": [
        {
            "sid": "xxx",
            "table": {
                "sid": "xxx",
                "name": "experiments"
            },
            "workflow": {
                "sid": "xxx",
                "name": "Plan an experiment",
                "description": "This workflow describes what you need to do before start an experiment."
            },
            "parent": null,
            "name": "Create an experiment note",
            "description": "Learn more at <a href='https://docs.labii.com/eln-and-lims/add-record' target='_blank'>here</a>",
            "condition": null,
            "protocol": null,
            "redirect_to": null,
            "color": "Grey",
            "is_archived": false,
            "updated_by": "xxx",
            "date_updated": "2020-02-10T03:02:27.174030Z",
            "date_created": "2020-02-10T03:02:27.172914Z",
            "change_permission": true
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Step List

<mark style="color:green;">`POST`</mark> `/tables/step/list/{level}/{sid}/{serializer}/`

#### Path Parameters

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

#### Query Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| widget\_\_sid | string |             |

#### Headers

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

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

```yaml
{
    "sid": "xxx",
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "workflow": {
        "sid": "xxx",
        "name": "Plan an experiment",
        "description": "This workflow describes what you need to do before start an experiment."
    },
    "parent": null,
    "name": "Create an experiment note",
    "description": "Learn more at <a href='https://docs.labii.com/eln-and-lims/add-record' target='_blank'>here</a>",
    "condition": null,
    "protocol": null,
    "redirect_to": null,
    "color": "Grey",
    "is_archived": false,
    "updated_by": "xxx",
    "date_updated": "2020-02-10T03:02:27.174030Z",
    "date_created": "2020-02-10T03:02:27.172914Z",
    "change_permission": true
}
```

{% endtab %}

{% tab title="406 " %}

```
Missing workflow__sid in get parameters
Wrong workflow sid - the provided workflow sid is not correct
```

{% endtab %}
{% endtabs %}

## Step Detail

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

#### Path Parameters

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

#### Headers

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

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

```yaml
{
    "sid": "xxx",
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "workflow": {
        "sid": "xxx",
        "name": "Plan an experiment",
        "description": "This workflow describes what you need to do before start an experiment."
    },
    "parent": null,
    "name": "Create an experiment note",
    "description": "Learn more at <a href='https://docs.labii.com/eln-and-lims/add-record' target='_blank'>here</a>",
    "condition": null,
    "protocol": null,
    "redirect_to": null,
    "color": "Grey",
    "is_archived": false,
    "updated_by": "xxx",
    "date_updated": "2020-02-10T03:02:27.174030Z",
    "date_created": "2020-02-10T03:02:27.172914Z",
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Step Detail

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

#### Path Parameters

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

#### Headers

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

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

```yaml
{
    "sid": "xxx",
    "table": {
        "sid": "xxx",
        "name": "experiments"
    },
    "workflow": {
        "sid": "xxx",
        "name": "Plan an experiment",
        "description": "This workflow describes what you need to do before start an experiment."
    },
    "parent": null,
    "name": "Create an experiment note",
    "description": "Learn more at <a href='https://docs.labii.com/eln-and-lims/add-record' target='_blank'>here</a>",
    "condition": null,
    "protocol": null,
    "redirect_to": null,
    "color": "Grey",
    "is_archived": false,
    "updated_by": "xxx",
    "date_updated": "2020-02-10T03:02:27.174030Z",
    "date_created": "2020-02-10T03:02:27.172914Z",
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Step Detail

<mark style="color:red;">`DELETE`</mark> `/tables/step/detail/{sid}/`

#### Path Parameters

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

#### Headers

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

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

```
{}
```

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