Configuring Objects in Birst from REST Data Sources

After creating a connection, you can create the different sources through the API.

  1. Navigate to Modeler Connect.
  2. Select the REST connector from the Connector section or click the existing REST connection from the Connections panel.
  3. From the connection, click +Create New Object.


  4. Complete these fields:
    Object Name
    The name of the object.
    Resource
    This indicates the Resource portion of the URL syntax. HTTP | HTTPS://<Endpoint>/<Resource>?<Query>
    Query Parameters
    his indicates the Query portion of the URL syntax. HTTP | HTTPS://<Endpoint>/<Resource>?<Query>
    Pagination
    Select the Pagination type and specify any additional information.
  5. For additional advanced settings, click More Options.
    Header
    You can create REST call headers at the object level. If more than one header is necessary, use the following syntax: <header name1>=<header value1>&<header name2>=<header value2>
    Request Type
    Birst supports three Request Types for APIs. Select your Request Type and specify any additional information.
    • GET requires no additional information.
    • POST - raw requires the POST body.
    • POST - x-www-form-urlencoded requires the Key/Value pairs.
    Dynamic Parameters
    Dynamic Parameters are useful in cases when you need to call an endpoint multiple times in order to gather all possible values for a given API resource. For example, the API may only provide a resource that lists all products belonging to a specific category. In order to create a source in Birst that contains the list of products across all categories sold, you must call that resource for each per product category. Birst allows you to use a column from another source of the same REST connector to iterate through all possible values of that column and populate the current source with the result of each separate resource call. If the syntax for the API is categories(category number)/products, in order for us to iterate through all categories, the API call with the correct category number must be supplied.
    Note: Repository variables can be used similarly to dynamic parameters.
    1. From More Options, click Configure Dynamic Parameters.
    2. Specify the Parameter Name. This name is used in the URL. In this example, we will use it in the Resource field.

    3. Specify the Object Name. Pick from the list of sources in the REST connector.

    4. Specify the Column Name. Pick a column from the list of available in columns in your selected source.
    5. Specify the Test Value. This is only used for preview. The test value has no impact when importing sources.
    6. Click + Add Dynamic Parameters to create any additional parameters.
    7. Click Done.
    8. Update your settings with the parameter or parameters. In this example, we updated the Resource field to use the Category ID. When using parameters in Birst, use the following syntax M[NameofParameter].Our example API syntax is categories(#)/products; the resource should be Categories(M[parameter_name])/products.

  6. Click Save.