AllowedCloudParameterExtensions

AllowedCloudParameterExtensions

is an option for APIFunction and related functions that specifies what extensions to allow for API or other input parameters.

Details

  • Extensions allow input parameters to be specified in URLs etc. as key__extension=val, where the extension defines how the actual value fed to the API or other cloud-executed code should be derived from val.
  • The following possible extensions are supported:
  • "url"fetch the data from the specified URL
    "json"interpret the given string as JSON
    "wl"interpret the given string as Wolfram Language data
    "csv"interpret the given string as CSV
    "tsv"interpret the given string as TSV
    "cloudobject"fetch the data from the specified cloud object
  • Possible settings for AllowedCloudParameterExtensions include:
  • Noneallow no extensions
    Allallow any supported extension
    Automaticallow safe extensions (currently "json")
    {ext1,ext2,}allow any of the extensions exti
  • The "wl" extension corresponds to a data-only subset of the Wolfram Language.

Examples

open allclose all

Basic Examples  (2)

Deploy an APIFunction that accepts JSON encoded matrices:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Deploy an APIFunction that accepts parameters given as Wolfram Language data:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Possible Issues  (2)

See Also

APIFunction  FormObject  URLExecute  AllowedCloudExtraParameters

Introduced in 2017
(11.1)