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. In Datasets, enter Rest API and select the connector from the results.
  3. Enter a Name that identifies the connection.
  4. From Authentication, select one of the following options.
    • Select Basic Authentication and then enter the credentials for the RESTful web service.
    • Select API Key/Token and then enter the API key and value. From Desired Authentication Parameter Type if you select Header Parameter you can make GET and POST requests. If you select Body Parameter you can only make POST requests.
    • Select Bearer Token and enter the Token.
    • If your web service does not require a username and password or an API key, select None.
  5. Select Save .

After you save the connection, Connect displays options to import data into a new table. Start at step 4 of the following section for more information on importing data to create a table.

Create a table with data from a connection

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. In Datasets, enter Rest API and select the connector from the results.
  3. Under Connection, select the Rest API connection that you previously set up. If you have not previously set up a connection, select New Connection and follow the steps in the previous section.
  4. On the left panel, enter a Name that identifies the table and select a Folder to save the table.
  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. By default, the maximum array depth is 5.
  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.