# List unified models

> Source: https://truto.one/docs/api-reference/admin/unified-models/list/

`GET /unified-model`

Resource: **Unified Models**

## Query parameters

- **`name`** _(string)_
  Filter by unified model name.
- **`category`** _(string)_
  Filter by category.
- **`version`** _(string)_
  Filter by version.
- **`team_id`** _(string)_
  Filter by team.

## Response body

- **`result`** _(array<object>)_
  - **`id`** _(string)_
    The ID of the unified model.
  - **`name`** _(string)_
    The name of the unified model.
  - **`category`** _(string)_
    The category of the unified model.
  - **`description`** _(string)_
    A brief description of what this unified model represents.
  - **`team_id`** _(string)_
    The ID of the team that owns this unified model.
  - **`sharing`** _(string)_
    The sharing policy of the unified model.
    Allowed: `allow`, `ask`, `deny`
  - **`resources`** _(object)_
    Map of resource name (e.g. `users`, `contacts`) → resource definition (`UnifiedModelResource`).
  - **`docs`** _(object)_
    Per-resource documentation (pricing plan / scopes / instructions).
  - **`scopes`** _(object)_
    Per-resource OAuth/permission scopes required to call its methods.
  - **`webhooks`** _(object)_
    Per-resource webhook routing expression (JSONata that decides whether an inbound webhook should be delivered to this resource).
  - **`created_at`** _(string)_
    The date and time when the unified model was created.
  - **`updated_at`** _(string)_
    The date and time when the unified model was last updated.
  - **`version`** _(number)_
    The current version of the unified model.
  - **`installed_environment`** _(array<string>)_
    A list of environment IDs where this unified model is installed.
  - **`team`** _(object)_
    - **`id`** _(string)_
      The ID of the team.
    - **`name`** _(string)_
      The name of the team.
    - **`domain`** _(string)_
      The domain of the team.
    - **`logo`** _(string)_
      The URL of the team's logo.
    - **`is_verified`** _(boolean)_
      Whether the team is verified or not.
    - **`is_white_label`** _(boolean)_
      Whether the team is white-labeled or not.
    - **`tos_link`** _(string)_
      A link to the team's Terms of Service, if available.
    - **`allow_impersonation`** _(boolean)_
      Whether the team allows impersonation.
    - **`created_at`** _(string)_
      The date and time when the team was created.
    - **`updated_at`** _(string)_
      The date and time when the team was last updated.
- **`next_cursor`** _(string)_
- **`limit`** _(number)_

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/unified-model' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/unified-model', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/unified-model"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```

### Truto TS SDK

```typescript
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

for await (const item of truto.unifiedModel.list()) {
  console.log(item);
}
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    async for item in truto_api.unified_models.list():
        print(item)

asyncio.run(main())
```
