Configure the request using a POST or PUT method
After you authenticate the connection, you can configure the request using a POST or PUT method. Use a POST method if you want to send data to create a child resource under the resource collection. Alternatively, use a PUT method if you want to send data to update an existing resource, or if the resource does not exist yet, create a new resource.
To configure the request using a POST or PUT method:
-
On the Configure Request screen, click POST or PUT 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/endpoint -
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.
-
Content-Type - this field displays application/json to specify that JSON is the format of content sent in the
POSTorPUTmethod.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.
-
-
In the Request Body window, enter a sample JSON request to test your connection. Ensure that the JSON is valid. Do not send real guest contact details in the sample request.
-
Click Test Request. The results of the test display in the Response window with the relevant status code.
-
Click Next. The Output Configuration screen displays for you to set the parameters that the user can select when they add the data system or analytical model to the canvas when creating a decision model variant. You must continue to configure output references or your connection will not be saved.