Run pipeline using restapi in Groovy Script
Summary:
Hello guys,
I'm trying to run a pipeline using Restapi in Groovy script. There is no error but i'm getting status 0 and it's not triggering to run the pipeline.
Below is the Code:
def payload ="""
{
"jobName":"Daily Integration 1",
"jobType":"PIPELINE",
"variables": {
"STARTPERIOD":"Jan-23",
"ENDPERIOD":"Feb-23",
"IMPORTMODE":"Replace",
"EXPORTMODE":"No Export"
}
}"""
HttpResponse<String> jsonResponse = operation.application.getConnection("FCCS_TEST")
.post('/aif/rest/V1/jobs')
.header("Content-Type","application/json")
.body(payload).asString();
println(jsonResponse.body)
Output:
Can any one suggest any idea on this don't know where it went wrong. Thanks in Advance