Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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