The Rest API connector transforms data to a flattened JSON format. Specifically, the connector flattens all nested data into a single layer of key pairs in a single table.
Note

The maximum JSON result is 500 Kb and the data cannot have more than 1,000 columns.

Set up a new connection

Complete the following steps to set up a connection in Minitab Connect.
  1. From the Home screen, select the Add button under Tables.
  2. Enter a Name that identifies the table and select a Folder to save the table.
  3. In Datasets, enter Rest API and select the connector from the results.
  4. From Authentication, you can select Basic Authentication and then enter the credentials for the RESTful web service. If your web service does not require a username and password, select None.
  5. Select Save .

Import a table

Complete the following steps to import a data file from an API and create a new table in Connect.
  1. From the Home screen, select the Add button under Tables.
  2. On the Dataset tab, enter a Name that identifies the table and select a Folder to save the table.
  3. Under API, select Rest API.
  4. Under Connection, select the Rest API connection that you previously set up. If you have not previously set up a connection, select New Connection.
  5. Under Update Frequency, specify how often you want Connect to update the table. You can import the data one time or have Connect continuously import the data at a set time interval. Connect automatically creates a flow for your import. If you select Once, you can use the flow at a later time to automatically run the import again.
  6. Under URL, enter the base request URL. You'll add parameters later.
  7. From Request Type, select either a HTTP GET request or a HTTP POST request.
  8. In Maximum Array Depth, select the maximum depth in which Connect converts JSON data nodes into table columns. The JSON string data becomes the cell value result when Connect reaches the maximum depth.
  9. Select Next.
  10. In Request Header Parameters and Request Body Parameters , enter the request parameters that you want to send.
  11. No fields are available initially. Select Add Parameter to add key pairs to the request URL parameters.
  12. In Array Key for Records (Root Path), enter the comma separated path to the node.
  13. Select Save . If you go to the Prep Tool and select Run , Minitab Connect displays the imported data.
    Note

    If no data appears after you select Run, select Reset Config .

When you save the import, Connect creates a flow with the settings that you selected. For more information on how to schedule a flow and add more data processes to clean data, go to Overview of the Flow Tool .

JSON Flattening Logic

Connect flattens the JSON results to properly represent them as a table. Flattening means to put the JSON into a single hierarchy structure so that there are no child or parent objects. Columns can then be represented since everything is a key-value pair. Nested objects are displayed by a dot operator in the column name.