cURL in terminal vs Execute Program
hi...strange thing here. If I run a cURL command in the terminal, I get a perfectly good response. If I run the EXACT same command via the "Execute Program" operator, I get an "error code 1". Any thoughts? [the OAuth token here only goes to a sandbox for testing...if you want to test it yourself, you'll have to request another one]
On Terminal:
curl -H 'Accept: application/json' -H 'Authorization: Bearer bc4f3536e0794af9988ad348bac8bb1f' 'https://api.ed-fi.org/api/api/v2.0/2017/schools'
Response:
[
{
"id": "ceaa310e29674ce29a158ad4f2d487a7",
"localEducationAgencyReference": {
etc...
In Execute Program:
curl -H 'Accept: application/json' -H 'Authorization: Bearer bc4f3536e0794af9988ad348bac8bb1f' 'https://api.ed-fi.org/api/api/v2.0/2017/schools'
Response:
External tool error
Process 'curl -H 'Accept: application/json' -H 'Authorization: Bearer bc4f3536e0794af9988ad348bac8bb1f' 'https://api.ed-fi.org/api/api/v2.0/2017/schools'' exited with error code 1.
Scott
Answers
I think i saw something like this come across the support tickets. Was that you?
Hmm I'm not sure that was me with the support ticket but I may have posted before. As you know I do a lot of API work from within RM and getting all the settings to work is often quite challenging. In this case I cannot even get out of the starting gate with Execute Program, much less Enrich Data via Webservice. I have a hunch(?) that the problem in this case is with the decimal point in the URL ("v2.0") but I cannot be sure. I have tried numerous encoding tricks but nothing so far.
Using these operators is often looking down a black hole. Is there a way to get more info to debug? I have the error code keys now via GitHub but I would love to see more verbose debugging capabilities...
Thanks as always.
Scott
Did you ever find an answer to this problem?
no...it is still a quandary. Can I too move threads to the new "Product Feedback" page? Stay tuned.
Scott
Hi there,
also from here strong support for this topic.
Working API-Calls often dont get executed via execute python, etc. with no clue where the problem is coming from.
Often problems are related to json in python in execute phyton (most prob java call). Therefore Strings and quotes are really messed up.
Getting more Feedback and better editior capabilites for executed code inside RM would really be helpfull.