Run Auto Predict Job through Groovy REST API call
Hey all,
I feel like I'm missing something obvious here. I'm attempting to write a Groovy rule that executes a REST API call to allow a lower permissions user to execute an Auto Predict job. I have the following and I'm getting a "Not Found" as my response even though the Auto Predict job is configured and saved.
Application app = operation.application String appName = app.getName()
HttpResponse<String> jsonResponse = operation.application.getConnection('EPBCS_SELF_REST_TEST').post("/HyperionPlanning/rest/v3/${appName}/jobs")
.header("Content-Type", "application/json")
.body(json(["jobType":"Auto Predict","jobName":"FMO Prediction", "parameters":["forceRun": "true"]])).asString()
println jsonResponse.body
Tagged:
0