Page 1 of 1

API issues

Posted: Tue May 04, 2021 10:23 am
by Sunnyland
Hi There,
I am currently using the switch api to push through jobs but unfortunalty they are not moving to the next connection.
I am using the Job - Route method

and getting a Success 200 response as below

"status": true,
"data": "http://myurl:51088/job/7b226964223a2236 ... 626166227d"

but the job is not progressing to the nextr connection. I have run out of ideas. Can anyone help shed some light?

Re: API issues

Posted: Tue May 04, 2021 1:54 pm
by freddyp
That is not much to go by. Did you use :id in the call or the actual job ID as returned by the List jobs call?

Re: API issues

Posted: Wed May 05, 2021 12:20 am
by Sunnyland
Hi Freddy,
I used the job id as returned in the List Jobs call. I also get the connection number from the List Jobs call. The weird thing is that it was working in the 2019 version. I stopped using for a while as I rebuilt some flows during which I upgraded from 2019 to 2020. Now I cannot get the api to function correctly.

This is my PUT statement - http://url/api/v1/job/6090de081821fa9f2 ... tion=route

I did just notice that I do get an error in messages.
Failed to execute the task 'taskId_202145-18104-c158wg.6s4eg.json': invalid metadata format

Would the metadata be referring to the connection data? The metadata field is optional so I didn't think I had to pass anything?
Screenshot 2021-05-05 093733.png
Screenshot 2021-05-05 093733.png (30.97 KiB) Viewed 965 times
I have tried with and without the metadata as "connections" is the only required field but I am getting the same result.

Re: API issues

Posted: Wed May 05, 2021 5:58 pm
by freddyp
When a checkpoint does not define metadata you do not have to specify the metadata field. In that sense it is optional. But when the checkpoint specifies metadata you have to fill it in. I could easily reproduce this using the Web Services documentation: it worked, then I added a field of metadata and I got the same error as you do.

I will report it that the documentation should be explicit about this.

Re: API issues

Posted: Mon May 10, 2021 1:40 am
by Sunnyland
Thanks Freddy,
that really helps. I have metadata but it is read only so I didn't bother to specify and the sample I am showing the field names are incorrect so that id why I would be getting the error message.
I don't need the metadata it is only there to help debug so will turn off for now. Thanks heaps for your assitance on this.