# List environment unified models

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

`GET /environment-unified-model`

Resource: **Installed unified models**

**List all environment-unified-model records** that match the given filters (like environment ID). You have the flexibility to customize a Unified Model and its configuration to better suit your specific needs. Customizing the models allow you to override default mappings, add new resources, and tailor the unified apis to fit seamlessly within your environment.  Read more about [Installing Unified Models](https://truto.one/docs/guides/unified-apis/installing-unified-api)

## Query parameters

- **`unified_model_id`** _(string)_
  Filter by base unified model ID.
- **`id`** _(string)_
  Filter by environment unified model ID.
- **`unified_model.name`** _(string)_
  Filter by base unified model name.

## Response body

- **`result`** _(array<object>)_
  - **`id`** _(string)_
    The ID of the environment-unified-model record.
  - **`unified_model_id`** _(string)_
    The ID of the unified model being installed or overridden.
  - **`environment_id`** _(string)_
    The ID of the environment where this unified model is installed.
  - **`override`** _(object)_
    An optional object containing environment-level overrides for the unified model. Deep-merged on top of the base unified model. See `EnvironmentUnifiedModelOverride` for the typed shape.
    - **`resources`** _(object)_
      Resource-level overrides keyed by resource name. A `null` value is a tombstone: it removes an inherited resource from this environment's effective unified model. Omitting the key cannot say that — overrides are deep-merged, so an absent key means "inherit from the base model". The tombstone is stripped while merging, so the resource is simply absent from the returned `unified_model` rather than present with a null value.
    - **`scopes`** _(object)_
      Per-integration extra OAuth scopes appended to the base unified-model scopes.
    - **`webhooks`** _(object)_
      Per-integration JSONata expressions that route inbound webhooks to unified-model resources.
    - **`docs`** _(object)_
      Per-integration documentation overrides.
  - **`created_at`** _(string)_
    Timestamp when this record was created.
  - **`updated_at`** _(string)_
    Timestamp when this record was last updated.
  - **`unified_model`** _(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

### Truto CLI

```bash
truto env-unified-models list -o 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.environmentUnifiedModel.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.environment_unified_models.list():
        print(item)

asyncio.run(main())
```

### curl

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

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/environment-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/environment-unified-model"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

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