RDL functions for REST API calls
The RDL function calls are as follows:
Function | Example of function call | Action |
|---|---|---|
restGET | restGet (uri, headers, queryParameters) | Performs an HTTP REST GET call and returns the results |
restPOST | restPost(uri, bodyContent, headers, queryParameters) | Performs an HTTP REST POST call and returns the results |
restPUT | restPut(uri, bodyContent, headers, queryParameters) | Performs an HTTP REST PUT call and returns the results |
restDELETE | restDelete (uri, headers, queryParameters) | Performs an HTTP REST DELETE call and returns the results |
The following table describes the function parameters:
Parameter | Description |
|---|---|
uri | The complete URI of the REST endpoint, starting with http or https. For example: uri = "https://api.example.com/rest/api/lastest/issue/000000" |
bodyContent | The bodyContent is a map that is converted into the appropriate JSON or HTML form data type. |
headers | (Optional) An RDL map containing the name/value pairs of any HTTP headers to be sent with the request. For example: jiraPat = "Xzc0MDU5NTM1OTY4OhaC7jZ07uyhovlNdRDcGbid94cL"headers.Authorization = "Bearer " & jiraPatheaders.Accept = "application/json" |
queryParameters | (Optional) An RDL map containing the name/value pairs of any query parameters to be sent with the request. If you need to send headers, but no parameters, send false. For example: queryParmeters.expand = "name,fields" |