About data-api
A skill describing data access conventions for Domo App Platform apps, with @domoinc/query as the default for dataset reads. It also documents manifest mapping and local development requirements.
Key features
- 01Query datasets with @domoinc/query
- 02Reserve SQL for exceptions
- 03Declare datasets in manifest.json
- 04Use ryuu-proxy for local API routing
- 05Authenticate locally with domo login
Use cases
- 01Implement grouped and sorted dataset queries
- 02Configure dataset aliases for an app
- 03Develop against Domo APIs locally
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ stahura/ domo-ai-vibe-rules --skill data-apiAfter installing, type/data-apiin Claude Code to confirm it loaded.
Details
From the project READMERule: Domo App Platform Data Access (Toolkit-First)
This rule is toolkit/query-first. Use @domoinc/query for dataset reads in apps.
Canonical Query Approach
1) Use @domoinc/query for dataset queries
yarn add @domoinc/query
import Query from '@domoinc/query';
const salesByRegion = await new Query()
.select(['region', 'Sales_Amount'])
.groupBy('region', { Sales_Amount: 'sum' })
.orderBy('Sales_Amount', 'descending')
.fetch('sales');
2) Keep SQL as exception-only
If you use SQL (SqlClient), remember it does not automatically respect page filters in dashboards.
import { SqlClient } from '@domoinc/toolkit';
const sqlClient = new SqlClient();
const result = await sqlClient.get(
'sales',
'SELECT region, SUM(Sales_Amount) AS total FROM sales GROUP BY region'
);
const rows = result.body.rows;
Required Manifest Wiring
Every dataset still must be declared in manifest.json under datasetsMapping.
{
"datasetsMapping": [
{ "alias": "sales", "dataSetId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "fields": [] }
]
}
Critical gotcha:
fieldsmust exist (can be[]) to avoid manifest parsing errors.
Local Development
- Use
@domoinc/ryuu-proxyfor local API routing. - Authenticate with
domo login.
Checklist
-
datasetsMappingaliases configured and valid - Queries implemented with
Query(not raw/data/v1by default) - Aggregations use actual dataset field names
-
.aggregate()not used
Comments
Markdown supported