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


---

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