GET
/v1/databases/{databaseId}/definitionbetaapiKeyworkspace
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
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
{
"data": {
"draft": null,
"published": null
}
}