PermuteDocs
Go to Permute

Databases · databaseDefinitionGet

Get draft and published database definitions

Requires database admin permission. Returns the versioned database table definitions.

GET/v1/databases/{databaseId}/definition
betaapiKeyworkspace

When to use

Read the database application draft and published definition before editing.

For agents

Requires database admin permission. Save the complete definition with the expected draft ref.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);

const result = await client.databases.definition('dbas_crm123');

Response

json
{
  "data": {
    "draft": null,
    "published": null
  }
}