The CreatorCon Call for Content is officially open! Get started here.

Using Mockaroo with ServiceNow Error Please Help

Stefan Petkovic
Tera Contributor

Hey guys I'm having some issues fetching some random data from the Mockaroo API.
I'll try to be short and to the point, thanks for listening.

Here's what I did so far I created a Connection & Credential Aliases and added one Connection with the connection URL as : "https://my.api.mockaroo.com/vehicles.json".

After this I created an action in flow designer and added a REST step, selected the connection alias that I created before and bellow within the headers I added name as : X-API-KEY and value as my API number which is 7c00c190

After this I created a data source with the type REST, format JSON and the request action was the action I created in the flow designer.

After I click load all records I get this errorr : javax.json.stream.JsonParsingException: Unexpected char 109 at (line no=1, column no=12, offset=11) Can you help me ?

 

 

I did attach all the images below of how I have set-up my app.

PS: who wants can see the same post on reddit as well : 
https://www.reddit.com/r/servicenow/comments/16pynei/using_mockaroo_with_servicenow_error_please_hel...

 

5 REPLIES 5

Tony Chatfield1
Kilo Patron

Hi, I suspect char 109 is a lower case m

ASCII table - Table of ASCII codes, characters and symbols (ascii-code.com)

Unfortunately, your screenshots do not make it clear why this occurs but the screenshot with the error appears to be data\file import? If yes have you reviewed the file to ensure the format is correct?
Can you test without your data source?
Does the integration authenticate? Does it pull back a file, or create a file form the payload?

Perhaps you could update the thread with some clear details of your configuration and process?

Hey thanks for reaching out. 
I did try to "hit" the API from other source like POSTMAN and it works just great. 
I have provided a link to my reddit where I have asked the same question and the images are a good visible quality. 
I'm not sure what else to include since the images do show my WHOLE configuration.
If it's still somehow not visible I will upload a video on youtube showcasing this. Please let me know 🙂 
This problem is really bugging me haha!

MackI
Kilo Sage

HI @Stefan Petkovic 

 

Please make sure you need to save the Response on Mockaro in JSON not XL OR XML format

 

The default is XLS format

 

Please click the preview and see whether the output is on JSON Format not MS EXCEL FORMAT

 

Save the format on JSON and then generate API 

 

I Hope this will resolve the issue.

MackI | ServiceNow Technical Consultant | DXC Technology Australia | ServiceNow Practice | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia

Javier de Jes_s
Tera Contributor

hi Stefan

 

Correct, what Mackl indicates is the format in Mockaroo, you left csv by default, that's how it appears in the video, change it to json and it will work

 

regards