Docs / built-apps / getDataPlan

getDataPlan

utilitysince 0.2.7not for built apps

Client function: get the saved mongoCollections schema (data plan) for a site.

import { getDataPlan } from 'flowstack-sdk'

Non-React client function. GET /api/v1/sites/{siteId}/data-plan.

Signature

getDataPlan(credentials, siteId, config?): Promise<ApiResponse<DataPlan>>

Parameters

ParamTypeNotesDescription
credentialsFlowstackCredentialsrequiredThe app owner's credentials (owner-scoped JWT).
siteIdstringrequiredThe site/app id to operate on.
configFlowstackClientConfigsince 0.2.7Client config (baseUrl, appScope, tenantId as needed).

Returns

FieldTypeDescription
Promise<ApiResponse<DataPlan>>The stored DataPlan (its mongoCollections schema).

Examples

Read the data plan
const res = await getDataPlan(credentials, siteId, { appScope });
WarningOwner/management operation — call it with the app owner's credentials from a builder/dashboard/server context, not from inside the generated app's end-user runtime. builtAppSafe is false.

See also

setDataPlan

Source: src/api/client.ts (Site Ops, P0-156) · Also available in llms-full.txt and registry.json.