How to call an REST API via a Service Catalog Item?DescriptionYou may need to automate some tasks in a REST API Server (an Ansible Server for example) via a Service Catalog Item. The Catalog Item will have its Process Engine as a Workflow. The workflow will make use of a HTTP Rest Message v2 to call the server. In this How-To, we will call an online web service with no authentication but in your scenario it would probably require a Mid Server and some authentication protocol.Instructions1/ We create a Catalog Item TestVariableWkf with Process Engine TestVariables workflow and 2 variables tag and region. 2/We create a REST Message (sys_rest_message) SimpleREST with an HTTP Methods MyPoster. 3/We create the HTTP Methods MyPoster so it can receive the 2 variables tag and region. Please note that we are using https://httpbin.org/anything which is a POST REST API that will accept any content and reply with what has been received. Please note that the important part is to define the content that will be passed to the EndPoint. The Variable Substitution can be used with the syntax ${Variable}. This comes from the documentation 4/We create a simple workflow TestVariables By following the documentation we create 2 variables for this workflow that will receive the Catalog Item variables. The log task is a simple way to verify that the variables are properly filled by the Catalog Item it contains the following code: javascript: "region is:" + current.variables["region"] + "and tag is:" + current.variables["tag"] The REST Caller task contains the logic to call the REST Message and pass the variables. try { var r = new sn_ws.RESTMessageV2("SimpleREST", "MyPoster"); var tag = current.variables["tag"]; var region = current.variables["region"]; r.setStringParameterNoEscape("region", region); r.setStringParameterNoEscape("tag", tag); var response = r.execute(); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); gs.info("HowTo_Body" + responseBody); gs.info("HowTo_status" + httpStatus); } catch(ex) { var message = ex.message; } Please refer to the documentation for more examples of using the REST messages. 5/We order the Catalog Item with the values tag = KB-TAG and region = KB-Region and we can check in the log that the REST API has replied as expected with the variables passed to the call.