You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!