Data api

From stahura/domo-ai-vibe-rules · View interactive version

Data api is an AI agent skill from the GitHub repository stahura/domo-ai-vibe-rules. High-level entry skill for Domo data access. Routes detailed query work to dataset-query.

How to use this skill

Skill file

Rule: 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:

Local Development

Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.