- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to set-up REST-API Link in script / what changed...?
Dear.
I made a try to import data from a cloud via a Rest-API script - and it worked - so I continued with the table and "modified it, wrote specs, made graphs etc.".
Now, I re-opened the same script and in the log-file there is some error which I donĀ“t unterstand in the log-file.
Please have a look in the png file. When I copy the https link into a browser, it works and shows data.
Could it be that JMP doesnĀ“t read the rest-api link because there are some < or [ or { which are missing in the link itself?
ā
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to set-up REST-API Link in script / what changed...?
The qm_data is HTML, not JSON. The <doctype> is the header on an HTML file. The JSON importer is producing the message because it does not understand HTML.
The JSON may be embedded in the HTML, or there may be a better rest api to get just the JSON data without an extra wrapper.
Ideally the rest api will return bare JSON. If necessary, you can write some sort of pattern matching/regex/substring JSL to dig the JSON out of the HTML.
use
write(qm_data); // if really long, use: write(left(qm_data,1000) );
and look at the log to see what you received.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to set-up REST-API Link in script / what changed...?
The qm_data is HTML, not JSON. The <doctype> is the header on an HTML file. The JSON importer is producing the message because it does not understand HTML.
The JSON may be embedded in the HTML, or there may be a better rest api to get just the JSON data without an extra wrapper.
Ideally the rest api will return bare JSON. If necessary, you can write some sort of pattern matching/regex/substring JSL to dig the JSON out of the HTML.
use
write(qm_data); // if really long, use: write(left(qm_data,1000) );
and look at the log to see what you received.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to set-up REST-API Link in script / what changed...?
Wonderful. Thank you very much!
Why is it so easy...;-)...
Best wishes. and thank you.
Ole
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to set-up REST-API Link in script / what changed...?
Welcome! I also sent a request asking for the error message to be improved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to set-up REST-API Link in script / what changed...?
...many things are easy for Craige ; )