Hi, all. I've posted this question in the Mathematica StackExchange group, but I figured some might be interested/able to help so posting it here as well seemed like a good idea:
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 appropriate 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? Was the Wolfram Cloud designed to handle these sorts of interactions? Some feedback would be awesome, because otherwise I think I've reached an indefinite roadblock with what I'm trying to do.
If this info helps, the permissions of the database cloud server is set to allow anyone to call information from it, and the permissions of the Wolfram Cloud server are set to public.