> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# List Data Contracts

> List and filter data contracts

# List Data Contracts

Retrieve a paginated list of data contracts, optionally filtered by status or entity.

## Query Parameters

**fields** `string`

Comma-separated list of fields to include. Options: `owners`, `reviewers`, `extension`.

**limit** `integer` (default: 10)

Maximum number of contracts to return (0–1,000,000).

**before** `string`

Cursor for backward pagination. Returns contracts before this cursor.

**after** `string`

Cursor for forward pagination. Returns contracts after this cursor.

**include** `string` (default: non-deleted)

Filter by deletion status: `all`, `deleted`, or `non-deleted`.

**status** `string`

Filter by contract status: `Draft`, `In Review`, `Approved`, `Rejected`, `Deprecated`, or `Archived`.

**entity** `string`

Filter by entity UUID. Returns only contracts attached to the specified entity.

```python GET /v1/dataContracts theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import DataContracts

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# List approved contracts
contracts = DataContracts.list(filters={"status": "Approved"})
for c in contracts.entities:
    print(f"{c.fullyQualifiedName.root} ({c.entityStatus})")

# List contracts for a specific entity
contracts = DataContracts.list(filters={
    "entity": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
})
```

```java GET /v1/dataContracts theme={null}
import static org.openmetadata.sdk.fluent.DataContracts.*;

// List contracts with fluent API
list().limit(20).fetch().forEach(contract -> {
    System.out.println(contract.getFqn() + " (" + contract.get().getEntityStatus() + ")");
});
```

```bash GET /v1/dataContracts theme={null}
# List all contracts
curl "{base_url}/api/v1/dataContracts?limit=10" \
  -H "Authorization: Bearer {access_token}"

# List approved contracts
curl "{base_url}/api/v1/dataContracts?status=Approved&fields=owners" \
  -H "Authorization: Bearer {access_token}"

# List contracts for a specific entity
curl "{base_url}/api/v1/dataContracts?entity=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "data": [
    {
      "id": "f7a1b2c3-d4e5-6789-0abc-def123456789",
      "name": "sales-orders-contract",
      "fullyQualifiedName": "sample_data.ecommerce_db.shopify.sales_orders.dataContract_sales-orders-contract",
      "entityStatus": "Approved",
      "entity": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "type": "table",
        "name": "sales_orders",
        "fullyQualifiedName": "sample_data.ecommerce_db.shopify.sales_orders"
      },
      "version": 0.1,
      "updatedAt": 1769982800000,
      "updatedBy": "admin"
    }
  ],
  "paging": {
    "total": 1
  }
}
```

***

## Response

**data** `array`

Array of data contract objects.

**paging** `object`

Pagination information.

**properties**

**total** `integer`

Total number of matching contracts.

**after** `string`

Cursor for the next page.

**before** `string`

Cursor for the previous page.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to list data contracts |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.