In BIME, you can import data using the REST connector. This article will instruct you on how to establish a new REST connection using the Connector Designer. The Connector Designer is BIME's tool for retrieving data from your endpoint. This article only discusses the REST API data source, not BIME's API. For information on BIME's API, see BIME API reference.
Note: The REST API contains the following limitations and restrictions:
- RA fields and pagination are not supported.
- The import limit is 50MG.
- Refresh tokens are not permitted.
- Direct connection size restriction 20Mo/100k lines
- Stored connection size restriction 30Mo
To create a new REST connection
- Click the Data sources library icon () on the left panel.
- Click +New to add a new connection.
- Select the REST data source icon ().
- Click the Create a new REST configuration button.
- In the Connector Designer, paste your endpoint URL. This example uses an open API to
retrieve datasets on renewable energy sources by location. You can use the example URL
below to test the REST connector.
- From the drop-down list, select to either GET or POST data.
- If you select GET, your data will be retrieved from the endpoint.
- If you select POST, you will be able to add data within your retrieved results. These changes will not be pushed to your database, but will appear in BIME. You can add additional JSON or XML in the Body panel.
- Select whether your dataset is formatted in JSON or XML.
- Enter a path to your results if your data array is nested within an answer. The example above uses the path $.outputs.all_stations to find the requested results.
- If your call requires authentication, you can select from Basic HTTP and
Digest Authentication options. You will be required to enter your credentials.
- You can also add optional parameters to your results in the Parameters panels.
You can select from either adding a header or query parameter. For the example above, the
Lat, Ion, and Radius parameters listed at the end of the URL are entered as queries.
- If you want to specify information for the entire REST API exchange such as authorization, select Header.
- If you want to specify information for only this connection such as specific locations, select Query.
- When you finish, click Test. A sample of your results will be displayed.
- Click Save to create your connector. Note: Your data will not be imported by clicking Save in the Connector Designer. You must complete the following steps in the Data source Builder.
- Click Next to proceed to the Schema step of the Data source Builder.
- Edit your element positions using the options in the middle of the Metrics and Attributes columns (see Editing your data).
- Click Next.
- Select a storage options (see Selecting a storage option).
- Click the Advanced tab to edit cache, time zone, Query Blender, or calculation settings.
- When you finish, click Save. Your data will be imported, and you will automatically be redirected to the Query Builder.