3
$\begingroup$

I've built a set of Wolfram APIs that call another API which builds specific queries given the parameters of a database and then outputs that query for the client in the query language syntax. Using URLExecute in the Mathematica notebook on the database URL itself works just fine, but the issue comes when trying to call the database API, and the issue has been narrowed down to the use of URLExecute in the body of APIFunction, which looks something like this:

APIFunction[{
"string1" -> "String",
"string2" -> "String"},
URLExecute[
 "http://path-to-database",
{
"format" -> "json",
"query" -> QueryBuilder[#string1, #string2]
},
"Method" -> "POST"] &]

When deploying the API to the cloud, the error message given was some kind of permission/configuration error. My question is, is there a way to work around this? Or is this pushing past the limits of the Wolfram Cloud capabilities?

EDIT: Here is the link to the identical post in the Wolfram Community. And here is the original error message I encountered upon sending the API request:

"ERROR The requested URL could not be retrieved \n\n \n \nThe following error was encountered while trying to retrieve the URL: http://ec2-52-91-61-79.compute-1.amazonaws.com:7474/db/data/cypher \nAccess Denied. \nAccess control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect. \nYour cache administrator is urlfetchproxy@wolframcloud.com . \n \n\n \n \nGenerated Wed, 22 Jun 2016 14:50:23 GMT by urlfetchproxy.wolframcloud.com (squid/3.5.9)"

$\endgroup$
  • 1
    $\begingroup$ It seems you also posted this question on Community. Please edit your question to include a link. See this meta thread. $\endgroup$ – J. M. is away Jun 21 '16 at 16:28
  • $\begingroup$ @J.M.thanks for the tip! Definitely a good practice $\endgroup$ – Lame-Ov2.0 Jun 21 '16 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.