Overview
A client-mode connector for the Domo Platform APIs (DataSet, Simple, Stream, User, Group, Page, Activity Log and Embed APIs). Use it to land plant data in Domo, such as OEE per minute, counters at shift end or historian tags, and to bring Domo results back to the shop floor: run SQL on a DataSet and publish the rows for an andon board or HMI, or issue an embed token to show a Domo card on a panel. The connectorDomoRestApi in DomoRestApi.lot has 33 events (20 GET, 6 POST, 6 PUT, 1 PATCH). 11 are writes: DatasetCreate, DatasetUpdate, DatasetImport, SimpleDatasetCreate, SimpleImport, StreamCreate, StreamUpdate, StreamExecutionCreate, StreamPartUpload, StreamExecutionCommit, StreamExecutionAbort. There are no DELETE events.
Domo Platform APIs run on one host for every customer: set BASE_ADDRESS to https://api.domo.com (already set in the template), with no trailing slash and no /v1. Topics use analytics/domo/<object>/<verb>; replies land on <topic>/response.
See the base guide: REST API Connectors.
Setup
- Sign in at developer.domo.com with a Domo account of your instance and open My Account > New Client.
- Give the client a name and the scopes the broker needs:
datafor DataSets and Streams,userfor users and groups,dashboardfor pages,auditfor the activity log. Save the Client ID and Client Secret. - The client acts as the Domo user that created it. To write to a DataSet that user needs the Manage DataSet grant (or ownership of the DataSet).
- Keep
DOMO_CLIENT_ID,DOMO_CLIENT_SECRETand the derivedDOMO_BASIC_AUTH(see below) in broker secrets and inject them withGET SECRET.
Authentication
OAuthToken calls GET /oauth/token?grant_type=client_credentials&scope=<scope> with Authorization: Basic <credentials>. basic_auth is the Base64 of <DOMO_CLIENT_ID>:<DOMO_CLIENT_SECRET>; store it as the secret DOMO_BASIC_AUTH. scope is a space-separated subset of the client’s scopes, URL-encoded (data, data%20user). The reply carries an access_token that is valid for about one hour. Every other event sends Authorization: Bearer <access_token> from the access_token field of the payload.
Events
Payloads
Basic Syntax
An excerpt of the template (the full file has all 33 events and comments):Examples
Keep a token for the other actions
Append OEE samples to a DataSet
The Simple API takes JSON rows and converts them to CSV. Create the DataSet once withSimpleDatasetCreate (the first import sets the schema) or with DatasetCreate and an explicit schema, then append:
analytics/domo/datasets/import (Domo answers 204 with an empty body):
Bulk load with the Stream API
For large or frequent loads, create a Stream once withStreamCreate (it creates its own DataSet; Stream imports only work on DataSets created this way). Then for each load:
- Publish
{"access_token": "<access_token>", "stream_id": "42"}toanalytics/domo/streams/executions/create. The reply carries the executionid. - Publish each part to
analytics/domo/streams/executions/partwithpart_id1, 2, 3 and so on. Parts can be sent in parallel; retry a failed part with the samepart_id.
- Publish
{"access_token": "<access_token>", "stream_id": "42", "execution_id": "1"}toanalytics/domo/streams/executions/commit. Domo imports all parts at once. Useanalytics/domo/streams/executions/abortinstead to drop the parts.
Query a DataSet and publish the rows
Publish toanalytics/domo/datasets/query. The table is always called table. The reply has columns, metadata and rows:
Notes
- Use
DatasetImportorSimpleImportfor small DataSets that are updated now and then, and the Stream API for large or fast-growing DataSets, as Domo recommends.REPLACEreplaces every row; the schema must match on every import. StreamsSearchwithqdataSource.id:<dataset_id>finds the Stream of a DataSet.StreamExecutionGetshowscurrentState(ACTIVE,SUCCESS,ERROR,ABORTED).DatasetExportreturns CSV (Accept: text/csv), published as received. For large DataSets query only the rows you need withDatasetQuery.CardEmbedTokenneeds a card embed id from Domo Everywhere and returns a token for the embed page. Treat the reply like a credential.- List events default to 50 items (
limitup to 50 for DataSets, 500 for users and Streams); page withoffset. - Not packaged on purpose: every DELETE (DataSets, Streams, PDP policies, groups, pages, collections, group members), user, group and page writes, PDP policy writes, the Account and Projects APIs, gzip-compressed parts, and the instance Product APIs (
<instance>.domo.com/api/...with developer tokens). - Domo’s data platform business is now part of Progress Software; the Platform API host and the OAuth flow are unchanged.
Status
Technical preview, blocked on a live test. Static, spec, example-body and mock checks pass, and keyless calls toapi.domo.com return the documented 401 answers. A live run needs a Domo developer client (client ID and secret with the data and user scopes) and a test DataSet.
