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

# Organization

## Method & Permission

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

## Organization List

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

Get a list of organizations that you have access to.

#### Path Parameters

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

#### Headers

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

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

```yaml
# serializer = name
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 4,
    "next": null,
    "previous": null,
    "add_permission": false,
    "results": [
        {
            "sid": "xxx",
            "name": "Test"
        },
        ...
    ]
}
# serializer = list
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 4,
    "next": null,
    "previous": null,
    "add_permission": false,
    "results": [
        {
            "sid": "xxx",
            "name": "Test",
            "username": "test",
            "description": "",
            "logo_icon": "",
            "logo_wordmark": "",
            "is_academic": false,
            "is_subscription": true,
            "available_till": "2022-02-10",
            "date_support_end": "2022-02-10",
            "days_available": 620,
            "dashboard": [
                {
                    "link": "https://docs.labii.com/",
                    "note": "Labii Documentation",
                    "index": 0
                }
            ],
            "change_permission": true
        },
        ...
    ]
}
# serializer = detail
{
    "page_size": 10,
    "page_number": 1,
    "page_count": 1,
    "count": 4,
    "next": null,
    "previous": null,
    "add_permission": false,
    "results": [
       {
            "sid": "xxx",
            "name": "Test",
            "username": "test",
            "description": "",
            "logo_icon": "",
            "logo_wordmark": "",
            "should_receive_weekly_digest": true,
            "backup_frequency": "Monthly",
            "backup_rate": 1,
            "metadata": [
                
            ],
            "credits": "-0.25",
            "seats": 5,
            "table_quota": 50,
            "project_quota": 50,
            "days_available": 620,
            "is_academic": false,
            "is_subscription": true,
            "available_till": "2022-02-10",
            "date_support_end": "2022-02-10",
            "payment": {
                "payment_option": "Subscription",
                "seats": 5,
                "available_till": "2022-02-10",
                "days_available": 620,
                "is_academic": "False",
                "credits": "$-0.25"
            },
            "enable_single_sign_on": "false",
            "close_account": "",
            "updated_by": "xxx",
            "date_updated": "2020-05-15T21:42:10.608716Z",
            "date_created": "2020-02-10T03:02:16.772767Z",
            "personnel": {
                "sid": "xxx",
                "name": "xxx"
            },
            "idp_login_url": null,
            "idp_logout_url": null,
            "dashboard": [
                {
                    "link": "https://docs.labii.com/",
                    "note": "Labii Documentation",
                    "index": 0
                },
            ],
            "change_permission": true
        },
        ...
    ]
}
```

{% endtab %}

{% tab title="406 " %}

```
Wrong level: organization. Acceptable level is ['user'].
```

{% endtab %}
{% endtabs %}

## Organization Detail

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

Get a organization object.

#### Path Parameters

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

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

```yaml
{
    "sid": "xxx",
    "name": "Test",
    "username": "test",
    "description": "",
    "logo_icon": "",
    "logo_wordmark": "",
    "should_receive_weekly_digest": true,
    "backup_frequency": "Monthly",
    "backup_rate": 1,
    "metadata": [
        
    ],
    "credits": "-0.25",
    "seats": 5,
    "table_quota": 50,
    "project_quota": 50,
    "days_available": 620,
    "is_academic": false,
    "is_subscription": true,
    "available_till": "2022-02-10",
    "date_support_end": "2022-02-10",
    "payment": {
        "payment_option": "Subscription",
        "seats": 5,
        "available_till": "2022-02-10",
        "days_available": 620,
        "is_academic": "False",
        "credits": "$-0.25"
    },
    "enable_single_sign_on": "false",
    "close_account": "",
    "updated_by": "xxx",
    "date_updated": "2020-05-15T21:42:10.608716Z",
    "date_created": "2020-02-10T03:02:16.772767Z",
    "personnel": {
        "sid": "xxx",
        "name": "xxx"
    },
    "idp_login_url": null,
    "idp_logout_url": null,
    "dashboard": [
        {
            "link": "https://docs.labii.com/",
            "note": "Labii Documentation",
            "index": 0
        },
    ],
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}

## Organization Detail

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

Update the organization information

#### Path Parameters

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

#### Request Body

| Name           | Type   | Description |
| -------------- | ------ | ----------- |
| name           | string |             |
| description    | string |             |
| logo\_icon     | object |             |
| logo\_wordmark | object |             |

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

```yaml
{
    "sid": "xxx",
    "name": "Test",
    "username": "test",
    "description": "",
    "logo_icon": "",
    "logo_wordmark": "",
    "should_receive_weekly_digest": true,
    "backup_frequency": "Monthly",
    "backup_rate": 1,
    "metadata": [
        
    ],
    "credits": "-0.25",
    "seats": 5,
    "table_quota": 50,
    "project_quota": 50,
    "days_available": 620,
    "is_academic": false,
    "is_subscription": true,
    "available_till": "2022-02-10",
    "date_support_end": "2022-02-10",
    "payment": {
        "payment_option": "Subscription",
        "seats": 5,
        "available_till": "2022-02-10",
        "days_available": 620,
        "is_academic": "False",
        "credits": "$-0.25"
    },
    "enable_single_sign_on": "false",
    "close_account": "",
    "updated_by": "xxx",
    "date_updated": "2020-05-15T21:42:10.608716Z",
    "date_created": "2020-02-10T03:02:16.772767Z",
    "personnel": {
        "sid": "xxx",
        "name": "xxx"
    },
    "idp_login_url": null,
    "idp_logout_url": null,
    "dashboard": [
        {
            "link": "https://docs.labii.com/",
            "note": "Labii Documentation",
            "index": 0
        },
    ],
    "change_permission": true
}
```

{% endtab %}
{% endtabs %}
