My code is as follows:
apiFunc[opt_, f_] := Switch[
opt,
"derivative", FullForm[Collect[ Derivative[f, x], x, FullSimplify]],
"integrate", FullForm[Collect[ Integrate[f, x], x, FullSimplify]],
"nabla", FullForm[Collect[(D[#,x]&) /@ f, x, FullSimplify]],
_, "invalid option"
];
func = APIFunction[{"opt"->"String","f"->"Expression"}, apiFunc[#opt,#f] &];
api = CloudDeploy[func]
When I run apiFunc["nabla", List[ArcSin[x]]]
on the notebook, it gives the desired result:
List[Power[Plus[1,Times[-1,Power[x,2]]],Rational[-1,2]]]
However, when I get the response from the web api, it gives
FullForm[{1/Sqrt[1 - x^2]}]
Why are they different? Is there any way to get the desired result on the web api?
I have the basic plan though. Does it matter?