GET requests with unparameterized paths

To define a GET request with an unparameterized path:
  1. From the Endpoint drop-down menu, select GET.
  2. In the Endpoint field, type the path portion of your endpoint after the base URL. Note that the value must be valid URL-encoded syntax. For example, spaces in an endpoint are replaced with %20. See "URL-encoded values" for details.
  3. In the Table Name field, type the name of the relational table to which you want the endpoint to map.
  4. Click Send to sample and map the endpoint.

POST requests

To use POST requests, you must define the path and the body of the request in the Model file in the JSON format. The path contains the URL endpoint and the body used in requests, while the body defines documents and provides sample values. The driver uses these sample values to define which data type to be used when executing a POST request.

To define a POST request:
  1. From the Endpoint drop-down menu, select POST.
  2. In the Endpoint field, type the path portion of your endpoint after the base URL. Note that the value must be valid URL-encoded syntax. For example, spaces in an endpoint are replaced with %20. See "URL-encoded values" for details.
  3. In the Table Name field, type the name of the relational table to which you want the endpoint to map.
  4. In the Body pane:
    1. From the drop down menu, select the response format type for the payload.
    2. Enter the body of a POST request that is used to define documents and provide sample values. For example:
      {
       "start_date":"2018-08-31",
       "end_date":"2018-09-01",
       "departments":"[engineering,marketing,sales]",
       "tags":"[blue,green,red]"
      }
  5. Click Send to sample and map the endpoint.

GET Requests with parameterized paths

Parameterized requests are issued as GET requests, unless they are specified in a POST request entry.

To define a request with parameterized paths:
  1. From the Endpoint drop-down menu, select GET.
  2. In the Endpoint field, type the path portion of your endpoint after the base URL. Note that the value must be valid URL-encoded syntax. For example, spaces in an endpoint are replaced with %20. See "URL-encoded values" for details.
  3. In the Table Name field, type the name of the relational table to which you want the endpoint to map.
  4. In the Parameterized Paths pane, enter your parmaterized paths using the following format:
    <base_path>/{<param_name>:<param_value>}/<optional_path>

    For example:

    /orders/get/{date:2020-07-01,yyyy-MM-dd}/all
  5. Click + to add additional parameterized paths for your endpoint.
  6. Click Send to sample and map the endpoint.

GET requests with query parameters

Requests with query parameters are issued as GET requests, unless they are specified in the body of a POST request entry.

To define a request with query parameters:
  1. From the Endpoint drop-down menu, select GET.
  2. In the Endpoint field, type the path portion of your endpoint after the base URL. Note that the value must be valid URL-encoded syntax. For example, spaces in an endpoint are replaced with %20. See "URL-encoded values" for details.
  3. In the Table Name field, type the name of the relational table to which you want the endpoint to map.
  4. In the Parameters pane, enter your arguments used for filtering the request:
    • Name: The argument parameter component of the parameter=value pair used for filtering the request. For example, interval.
    • Op: The operator component of the argument.
    • Value: The value argument parameter used for filtering the request. This value is the default parameter value when issuing a query. You can override the default value by providing a parameter as a filtering condition in the Where clause of a Select statement.
  5. Click the + button to add additional arguments.
  6. Click Send to sample and map the endpoint.

GET requests with HTTP headers

Some endpoints employ custom HTTP headers to filter data returned by a GET request. This type of filtering is typically used to create multiple unique reports/tables from the same endpoint.

To define a request with HTTP headers:
  1. From the Endpoint drop-down menu, select GET.
  2. In the Endpoint field, type the path portion of your endpoint after the base URL. Note that the value must be valid URL-encoded syntax. For example, spaces in an endpoint are replaced with %20. See "URL-encoded values" for details.
  3. In the Table Name field, type the name of the relational table to which you want the endpoint to map.
  4. In the Headers pane, provide values for the following fields:
    • Name: The HTTP header component of the header=value pair used for filtering the request. For example, X-Subway-Payment.
    • Value: The value argument for the HTTP header used for filtering the request or, if overriding the default Accept header, the value of the Accept header for the endpoint. For example, token.
  5. Click Send to sample and map the endpoint.

Requests for embedded objects

If you only want to return results for an embedded object:

  1. From the Endpoint drop-down menu, select your request type.
  2. In the Endpoint field, type the path portion of your endpoint after the base URL or select an existing endpoint from the pane on the left. Note that the endpoint value must be URL-encoded using valid syntax. For example, spaces in an endpoint are replaced with %20. See "URL-encoded values" for details.
  3. In the Table Name field, provide or modify the name of the relational table to which you want the endpoint to map.
  4. In the JSON Root field, provide or modify the simple path to the imbedded object containing the results you want mapped to a relational table. For nested elements, separate the element names with forward slashes (/).
  5. Click Send to sample and map the endpoint.