Skip to main content

Intro

Use the JSON Advanced Writeback connector to export your data from a Domo DataSet to any OAuth-protected HTTP endpoint that supports data in JSON format. You can connect to your JSON Advanced Writeback account in the Data Center. This topic discusses the fields and menus that are specific to the JSON Advanced Writeback connector user interface. To add DataSets, set update schedules, and edit DataSet information, see Adding a DataSet Using a Connector.

Prerequisites

To connect to your JSON Advanced Writeback account and create a DataSet, you need the following:
  • If the API you are connecting to uses Authorization Code Flow for authentication, you need a Client ID, Client Secret, and Authorization URL.
  • If the API you are connecting to uses Client Credentials Flow for authentication, you need a Client ID and Client Secret.
Refer to the API documentation of the system you are trying to writeback to, to determine which code flow the API uses, how to create a Client ID and Secret pair, and the Authorization URL (if applicable). If the API documentation does not explicitly state which flow it uses, then check the value of the ‘grant_type” mentioned.

Connecting to Your JSON Advanced Writeback Account

This section enumerates the options in the Credentials and Details panes on the JSON Advanced Writeback Connector page. The components of the other panes on this page, Scheduling, and Name & Describe Your DataSet, are universal across most connector types and are discussed in great detail in Adding a DataSet Using a Connector.

Credentials Pane

This pane contains fields for entering credentials to connect to your JSON Advanced Writeback account. The following table describes what is needed for each field:

Field

Description

Client ID Enter the Client ID for your OAuth authentication.
Client Secret Enter the Client Secret for your OAuth authentication.
OAuth Type If your API does not specify the type of flow it uses, look for the ‘grant_type’ parameter required by the API to determine which flow to use.
Authorization URL Enter the API authorization endpoint. This is the endpoint used for the first call in the OAuth handshake.
Additional parameters for the authorization URL API call
Add additional parameters your API requires with the authorization URL (optional).
Access Token Url
This endpoint will return the access token to authenticate other API calls.
Additional parameters for the access token URL API call
Add additional parameters your API requires with the access token URL (optional).
Authorization Type
Select how you want to pass the client id and secret to the API for which you want to call. Refer to the API documentation to determine which option to use.
Refresh Token Url
Refer to your API documentation for the URL, for which you want to obtain a new refresh access token. In some cases, this is same as the endpoint to get a new access token. If that is the case, then leave this field blank.
Scopes
Enter the scopes needed for this connection (optional). Scopes should usually be separated by a space.
State Type
Select the type of state required by your OAuth (It is rare to modify this selection).
State Location
Select whether to send the state as a query parameter or in the path.
Response Type
Select the response type to use with the authorization URL (It is rare to modify this selection).
Use redirect uri when refreshing access token
Select whether the redirect uri needs to be passed to the API when refreshing the access token (this is rare).
Force token refresh on every run
Select this if you need to refresh the access token for every run of the connector. This may be necessary if your token is regularly invalidated outside Domo, but this is rare.
Once you have entered valid JSON Advanced Writeback credentials, you can use the same account at any time to create a new JSON Advanced Writeback DataSet. You can manage connector accounts in the Accounts tab in the Data Center. For more information about this tab, see Manage Connector Accounts.

Details Pane

Menu Description
Domo DataSet ID Enter the dataset id of the dataset which contains the data you are trying to write back.
HTTP Request Type
Select the HTTP method required by the API to write data back. Refer to the API documentation for the appropriate method to be used.
JSON URL Path Enter the URL to the API endpoint used to write the data in the input dataset back. Refer to the API documentation for the appropriate value.

Other Panes

For information about the remaining sections of the connector interface, including how to configure scheduling, retry, and update options, see Adding a DataSet Using a Connector.

FAQs

The connector creates one JSON request per row in the input dataset. Each column name in the dataset is treated as an attribute name whose value is in the row. For example, if you have a dataset that looks like this:
The JSON connector will send 3 requests to the target system, with the following payloads:
{
  "name": "My first project",
  "public": "false",
  "members": [],
  "description": "Test project created in JSON Writeback"
}
{
  "name": "My second project",
  "public": "false",
  "members": [
    2067563344
  ],
  "description": "test project created in JSON writeback 3.  Updated description"
}
{
  "name": "My third project",
  "public": "true",
  "members": [
    {
      "subname": "deprecate old connectors",
      "category": "usability"
    }
  ],
  "description": "Yet another project"
}
The connector will send one request per row. To batch multiple objects in one request, you need to format your input dataset to contain multiple objects in each row.
The output dataset of this connector contains the requests sent to the target system by the connector and the response returned by the API. The requests sent are in the “INPUT REQUEST BODY” column and the response is in the “OUTPUT RESPONSE” column. You can use this dataset to confirm the data being sent, the format of the data, and the response from the API.Note: The connector logs the exact response sent by the API. Some APIs are very verbose and some are not. The extent of the information in the OUTPUT RESPONSE column is completely dependent on the API which is called. Refer to your API documentation for information on return codes and messages.
The Update Method in the Scheduling section refers to the output dataset, not the target system. If you set the Update Method to Append, then each time the connector runs, the responses from the API will be appended to the rows in the output dataset. If you set the Update method to Replace, then the connector will rewrite the rows in the output dataset with the responses every time it runs.
Yes, the connector will try to writeback all rows in the dataset. If the system you are writing to throws an error on one row, then the connector will log the response, and then move to the next row.