Create a parameterised version of JIRA REST API from Katalon

I am attempting to create issue type “TEST” or “STORY” in JIRA using its REST API via katalon:
http://jirapp0001vt.metest.local:8080/rest/api/2/issue/

I have the following script under “HTTP BODY”:

{
“fields”: {
“project”:
{
“key”: “P1”
},
“summary”: “REST - Create new issue using API”,
“description”: “Creating of an issue using project keys and issue type names using the REST API”,
“issuetype”: {
“name”: “Bug”
},
“priority”:{
“name”: “Major”
}
}
}

However, these are exact values like “P1” and description. I need to integrated my test cases from Katalon into creating the same in JIRA. However, I need to parameterise project key “P1” coming from the value I specified in default profile and the Test case title in Katalon under “Summary”.

https://docs.katalon.com/katalon-studio/docs/parameterize-a-web-service-object.html

I think this is the info you are looking for

Thanks for this. However, I would like to pass on the parameterized values from either the “default profile” or the actual “test case (script mode)” and not on the variables specified in the API.
Also, the page does not show how I can parameterise the contents in the HTTP BODY tab. Would you have idea?

Having the ability to use variables in an object allows the users to have more control of the objects and fulfill all the testing requirements. The approach is the same with Web UI object. Katalon Studio supports variables for the following information of a Web Service object.

  • URL
  • Query Parameters
  • HTTP Header ****
  • HTTP Body
  • Verification

The same technique is used for all places. They are variables which you can pass values from Profiles, DataSet, Internal value, etc. There is no limit on how to use it.

Just build the request body from a map, with JsonOutput, and pass it to the request object as a string variable, see:
http://groovy-lang.org/json.html

Or, you can build the body using a template:
http://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html