Skip to main content

Groovy

def request = new URL("<YOURTRIGGERURL>").openConnection();def message = '{"options": {"method": "GET","headers":{"Content-Type": "application/json","Accept": "application/json"}},"url": "/rest/api/3/issue/DEV-16"}'request.setRequestMethod("POST")request.setDoOutput(true)request.setRequestProperty("Content-Type", "application/json")request.setRequestProperty("apiKey","<YOURTOKEN>")request.getOutputStream().write(message.getBytes("UTF-8"));def responseCode = request.getResponseCode();println(responseCode);if (responseCode.equals(200)) {    println(request.getInputStream().getText());}