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

Groovy rule calling RESTAPI PLAN_TYPE_MAP - not working

Received Response
30
Views
14
Comments
edited Feb 12, 2021 4:12AM in Planning 14 comments

Content

 

I am working on a groovy rule to call a REST API for running a data map.  
I would skip the API and use a smart push, however I want to bypass dimensional security.

Contents of rule:

// Initiate Map
Map<String, Boolean> Params = new HashMap<String, Boolean>()

// Establish Parameters
Params.put('clearData', true)

def body = new JSONObject()
.put("jobType", "PLAN_TYPE_MAP")
.put("jobName","CopyTest")
.put("parameters",Params)
.toString()

HttpResponse<String> jsonResponse = operation.application.getConnection("DemoOther").post()
.body(body)
.asString();

println "JSON Body:$body"

The rule appears to run, but there is no data movement.
Log messages : 
JSON Body:{"jobName":"CopyTest","jobType":"PLAN_TYPE_MAP","parameters":{"clearData":true}}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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