Configure the request using a GET method
After you name and authenticate the connection, you can configure the request using a GET method. Use a GET method if you want to retrieve data from the data system or analytical model, and use it as input in a programmable or decision table. Alternatively, you can configure the request using a POST or PUT method.
To configure the request using a GET method:
-
On the Configure Request screen, click GET from the method drop-down list.
-
In the Request URL field, enter the URL to send the request. Use the following format:
https://example.com/api/endpointTipYou can use FreeMarker to write query parameters at the end of the URL. A query parameter is an extension of the URL that defines specific content or actions based on the data being passed. For example:
https://example.com/api/${email} -
Click Show Default Headers to display the default headers and parameters for the REST request:
-
Accept - this field displays application/json to specify that JSON is the accepted format for the response.
-
Accept-Encoding - this field displays gzip to specify that gzip is the accepted compression type.
TipHeaders and parameters represent the meta-data associated with the REST API request and response. Headers and parameters contain information that can help you troubleshoot issues.
-
-
To add additional headers, click Add Header. In the additional row that displays, enter the following:
-
Key - the header name.
-
Value - the parameter.
-
-
To configure the Connection timeout:
-
Connection Timeout (ms) - in the drop-down list, click the milliseconds for the connection to timeout. This is the number of milliseconds of inactivity before the connection closes. This displays 1000 milliseconds by default.
-
Read Timeout (ms) - in the drop-down list, click the milliseconds for the read timeout. This is the number of milliseconds that the connection remains open without a response from the server. This displays 1000 milliseconds by default.
-
-
Click Test Request. The results of the test display in the Response pane with the relevant status code.
-
Click Next. The Review & Save screen displays. You must continue to review and save the connection or none of the connection setup will be saved.