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:

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

Scope  (1)

Deploy an APIFunction that can fetch a URL or CloudObject:

Possible Issues  (2)

Allowing for "url" or "cloudobject" might allow a malicious user to send data in a way that consumes a lot of the deployer's cloud credits:

Setting AllowedCloudParameterExtensions to allow for "wl" does not mean that any Wolfram Language expression is allowed:

Wolfram Research (2017), AllowedCloudParameterExtensions, Wolfram Language function, https://reference.wolfram.com/language/ref/AllowedCloudParameterExtensions.html.

Text

Wolfram Research (2017), AllowedCloudParameterExtensions, Wolfram Language function, https://reference.wolfram.com/language/ref/AllowedCloudParameterExtensions.html.

CMS

Wolfram Language. 2017. "AllowedCloudParameterExtensions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AllowedCloudParameterExtensions.html.

APA

Wolfram Language. (2017). AllowedCloudParameterExtensions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AllowedCloudParameterExtensions.html

BibTeX

@misc{reference.wolfram_2023_allowedcloudparameterextensions, author="Wolfram Research", title="{AllowedCloudParameterExtensions}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/AllowedCloudParameterExtensions.html}", note=[Accessed: 16-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_allowedcloudparameterextensions, organization={Wolfram Research}, title={AllowedCloudParameterExtensions}, year={2017}, url={https://reference.wolfram.com/language/ref/AllowedCloudParameterExtensions.html}, note=[Accessed: 16-April-2024 ]}