---
title: External Lookup
description: External Lookup protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

External Data Source Schema

Configuration for connecting to external data systems.

Similar to Salesforce External Objects for real-time data integration.

@example

```json

\{

"id": "salesforce-accounts",

"name": "Salesforce Account Data",

"type": "rest-api",

"endpoint": "https://api.salesforce.com/services/data/v58.0",

"authentication": \{

"type": "oauth2",

"config": \{

"clientId": "...",

"clientSecret": "...",

"tokenUrl": "https://login.salesforce.com/services/oauth2/token"

\}

\}

\}

```

<Callout type="info">
**Source:** `packages/spec/src/data/external-lookup.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { ExternalDataSource } from '@objectstack/spec/data';
import type { ExternalDataSource } from '@objectstack/spec/data';

// Validate data
const result = ExternalDataSource.parse(data);
```

---

## ExternalDataSource

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Data source ID |
| **name** | `string` | ✅ | Data source name |
| **type** | `Enum<'odata' \| 'rest-api' \| 'graphql' \| 'custom'>` | ✅ | Protocol type |
| **endpoint** | `string` | ✅ | API endpoint URL |
| **authentication** | `Object` | ✅ | Authentication |


---

