Deploy and Use a Cloud-Based API on the Command Line
WolframScript is able to execute functions deployed using APIFunction with only the UUID as an argument. Start by deploying a simple API to the cloud.
In[1]:=
myapi = CloudDeploy[
APIFunction["ticker" -> "TickerSymbol",
EntityValue[#ticker, EntityProperty["Financial", "Last"]] &]];
Save the associated UUID to a file.
In[2]:=
Put[ScriptForm[URLParse[myapi]["Path"][[3]]],
FileNameJoin[{$HomeDirectory, "examples", "my_api_file"}]]
Call the API from the command line with WolframScript.
Alternatively, try running the API using a cloud-based kernel instead.