9 votes
Accepted

How to make APIFunction accept parameters from body?

Ultimately the body can be extracted by using HTTPRequestData HTTPRequestData[] will return an ...
  • 10.8k
8 votes

Can I Import data into Google Spreadsheet using a Wolfram Cloud API?

Yes, it's possible to do that. Here is a toy code. ...
  • 25.8k
7 votes
Accepted

Calling APIFunction from Javascript

This should work: First use a named CloudObject (that way you don't have to constantly update your web page every time you make changes to your ...
6 votes
Accepted

Build API without the WolframCloud?

Currently APIFunction / CloudDeploy works only with the Public Cloud or an Enterprise Private Cloud. So either you need an EPC ...
5 votes

How to set ZeroMQ subscribe channel in Mathematica?

I think this part of the interface is broken. From some digging I found: ZeroMQLink`SocketOptions`Private`setSockOptSingle which is called by ...
  • 46.1k
4 votes

How to return multiple types in APIFunction?

You can do something like this (encoding the PNG in Base64): ...
  • 10.8k
4 votes

APIFunction can not access HTTP request body when used with URLDispatcher

So after some digging and breaking "MQTTLink`" for while I found that "MQTTLink`" is passing garbage out to its handler ...
  • 46.1k
3 votes

How to set ZeroMQ subscribe channel in Mathematica?

Sorry for the late response. There is indeed a problem with ZMQ option management. @b3m2a1 did a very good job at digging into the code for an answer. The expected input is a list of integer (list of ...
  • 371
3 votes

How to set ZeroMQ subscribe channel in Mathematica?

https://www.wolfram.com/language/12/networking-and-system-operations/zeromq-publisher-model.html ...
3 votes

How can I deal with a 502 error?

Alright, I got into contact with the support for the API, and the problem was resolved on their end. Apparently, it was an error in the routers' networking configuration.
  • 1,407
3 votes
Accepted

How to authenticate in Wolfram Cloud created API?

You may want to implement the PermissionsKey option in the API deployment permissions: ...
  • 540
3 votes
Accepted

Access openai with HTTPRequest but body parameters seems not function

According to Kuba's and GustavoDelfino's comments, the solution is to make sure to send a JSON body with a proper content-type header: ...
2 votes

How to return JSON from APIFunction without string encapsulation?

As Lukas Lang said, You need to specify "String" as result type for the APIFunction, as in ...
  • 30.4k
2 votes

Build API without the WolframCloud?

Now there's WolframWebEngine which allows one to create a sort of personal wolfram cloud.
  • 2,020
2 votes

Cloud Deploying a Scheduled Task

I am not sure how many of y'all have been keeping up with the Community discussion, but there are some key updates I wanted to summarize here: ScheduledTask does ...
2 votes

Is there any logging for cloud deployed API? If yes, how to check those?

I will show you a small piece of code you can use as a starting point, it is already nice enough. Just compose withLogger[apiPath] with your APIFunction's function....
  • 135k
2 votes

How to pass parameter to an API function?

func = APIFunction[{"t" -> "Real", "y"->"Real"}, #t*#y &]; api = CloudDeploy[func, Permissions -> "Public"] You don't need to access it via ...
  • 135k
2 votes

Build API Function

Here is an extended comment. This seems to be a task for URLDispatcher but as soon as the url contains a file extension the Cloud responds with 500 internal error. ...
  • 135k
1 vote

Deploying A Classifier Function

After a bit of playing around, I think I have a workable solution to share. Firstly, let's create a classifier using the titanic datset. ...
  • 747
1 vote

CloudDeploy DataSet does not work

I contacted Wolfram support and got the following answer. I have forwarded an issue report to our Cloud development team. We hope this can be resolved in the future versions of Wolfram Cloud. So ...
  • 21
1 vote

How to CloudDeploy an Association as an API

content = APIFunction[{"x"->"String"},<|"lampstatus"-> "on", "temp" -> 37.2|>[#x]&]; CloudDeploy[content]
  • 31
1 vote
Accepted

How to create an APIFunction that takes a list with constraints on the list elements?

WRI tech support advise to use this syntax: func = APIFunction["x" -> RepeatingElement[Interpreter[Restricted["Integer", {1,\[Infinity], 1}]]], #x^3 &]

Only top scored, non community-wiki answers of a minimum length are eligible