Send GRID variables to Matillion Job Via API

Hey Guys,

I am using AJAX request to run a Matillion job.

 

I am able to run the job without sending any parameters, when i tried to send GRID VARIBALES in the BODY of the request I am getting issues.

 

Ajax Request I am trying:

 

var settings = {

 "url": "http://test.com/rest/v1/group/name/test_group/project/name/test_project/version/name/test_oj/job/name/oj_demo_grid/run",

 "method": "POST",

 "timeout": 0,

 "headers": {

  "Authorization": "Basic ******************************************",

  "Content-Type": "application/json"

 },

 "data": JSON.stringify({

  "scalarVariables": {},

  "gridVariables": {

   "A": "test",

   "B": "MSP",

   "C": "Unmapped"

  }

 }),

};

$.ajax(settings).done(function (response) {

 console.log(response);

});

 

 

Issue I am getting:

"Cannot deserialize instance of `java.util.ArrayList` out of VALUE_STRING token\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 3, column: 42]

 

Any Suggestions on Syntax for sending GRID VARIABLES.

I check Documentation as well but nothing is there.

Hi there - did you get an answer to this question? We are also searching for something similar. It would be great if you could include a link to the Matillion documentation you are referencing. I'm having a hard time finding that also!

Cheers

Steve

Here's the link to the current documentation,

https://docs.matillion.com/metl/docs/2475544/#post-body

 

As per the original question, I see that the GridVariable build-up is a bit wrong when looking at the documentation. But I guess this one has been sorted out already.

Have not tried this myself but if issues I can test this out a bit.