Base URL
- alias: the name you provided for the dataset mapping in your app’s manifest
- queryOperators: URL parameters that enable you to create custom queries of the mapped dataset. Possible query operators are:
- avg
- calendar
- count
- dategrain
- fields
- filter
- groupby
- limit
- max
- min
- offset
- orderby
- sum
- unique
aggregations
Consolidate all rows of a column into a single value or override the default aggregations for
dategrain and groupby clauses. Multiple fields can be specified by delimiting with commas.
groupby or dategrain, then a single row of data will be returned with the aggregated fields only.
calendar
Specify which calendar to use for date-related operations such as
todate, last, and dategrain.
dategrain
Perform a
groupby with predefined date grains. By default, numerical columns are summed and unique entries of non-numerical columns are counted. Can be combined with an aggregation to override this default behavior.
CalendarXXXX will be returned with the data (e.g. CalendarMonth for month date graining). Date graining by “day” will return a column Date, and date graining by “year” will return a column Year.
If you already have a column with that name, it will be overridden by this new date field. In addition, the column you request as the date grain will not be present in the result by its original name.
fields
Limit the result set to specific columns from the dataset by providing either the field alias or the original column name (if no alias was defined in the manifest). Multiple fields can be combined into a comma separated string.
filter
Limit the rows returned by the request by providing more fine-grained filters. Multiple filter parameters can be combined into a single comma separated string.
groupby
Aggregates identical data into groups. By default, numerical columns are summed and unique entries of non-numerical columns are counted. Can be combined with an aggregation to override this default behavior. Multiple columns can be grouped by delimiting each with a comma.
limit & offset
Provides the ability to paginate the query results.
orderby
Rows can be ordered by any column in
ascending or descending order. The order defaults to ascending and a multi-column order can be defined by delimiting each order clause with a comma.
Data Formats
You can control the format of the data returned from this endpoint by setting the request
Accept header. If leveraging the domo.js library, the same can be accomplished by passing a format option in the request. Please refer to the domo.get() documentation for further details.
array-of-objects
Header
Beast Modes
Previously a known limitation of the Data API, you can now optionally use beast modes in your queries. In order to use beast modes in your data request, the
useBeastMode query parameter must be set to true.
Basic Example
The following example shows a query that returns only a beast mode column (as noted by the fields operator). You’ll notice that the useBeastMode=true query string parameter is added to this request.
beastModeAlias field is the alias provided to the column in your manifest that maps to a beast mode that has been wired up on the wiring page of an app.
Traditionally, when not using beast modes in your request, if you provide a groupby operator but don’t specify an aggregation operator, Domo will automatically sum the other columns for you (if they are numbers) or count them (if they are strings or dates). When beast mode is enabled, you must explicitly provide some sort of aggregation any time you use a groupby operator. That can either be by using an aggregation operator in the query string or by providing an aggregation function in the formula of your beast mode calculation. It must be thought of as structuring a SQL query, wherein if you create a SQL query that has a group by but not all fields in the SELECT statement were aggregated or included in the group by, SQL will throw an error. It might look something like this:
groupby operator so that the query knows how to group the results of the beast mode’s aggregation function.
Known LimitationYou cannot use the filter operator on a beast mode that contains an aggregate function (the equivalent of a having clause which is not supported in Domo today).
SQL API
You can now use SQL to query your Domo DataSet as an alternative to using the Data API. You can use the same SQL you’re used to except JOINs and trigonometric functions. For example: