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

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