ExternalBundle[{"name1"obj1,"name2"obj2,…}]
represents a bundle of resources to be externally deployed as named URLs, functions, etc.
ExternalBundle[{name11{name1…,…},…}]
represents a nested bundle of resources.
ExternalBundle
ExternalBundle[{"name1"obj1,"name2"obj2,…}]
represents a bundle of resources to be externally deployed as named URLs, functions, etc.
ExternalBundle[{name11{name1…,…},…}]
represents a nested bundle of resources.
Details
- Within CloudDeploy, or EmbedCode for web destinations, ExternalBundle effectively defines the contents of a directory or hierarchy of directories in the cloud.
- Within EmbedCode for languages, ExternalBundle defines bundles of named external functions.
Examples
open all close allBasic Examples (1)
bundle = CloudDeploy[ExternalBundle[{"factor" -> APIFunction["n" -> "Integer", FactorInteger[#n]&], "primeq" -> APIFunction["n" -> "Integer", PrimeQ[#n]&]}]]The bundle can be read back as an expression:
contents = Get[bundle]URLExecute[Lookup[First[contents], "factor"], {"n" -> 187}]Scope (2)
Create a bundle with nested rule list, creating subdirectories:
bundle = CloudDeploy[
ExternalBundle[
{
"api" -> {"factor" -> APIFunction["n" -> "Integer", FactorInteger[#n]&], "primeq" -> APIFunction["n" -> "Integer", PrimeQ[#n]&]},
"form" -> {"factor" -> FormPage["n" -> "Integer", FactorInteger[#n]&], "primeq" -> FormPage["n" -> "Integer", PrimeQ[#n]&]}
}]]The contents of the bundle are nested:
Get[bundle]bundle = CloudDeploy[ExternalBundle[{"square" -> APIFunction[{"s" -> "Integer"}, #x^2&], "root" -> APIFunction[{"r" -> "Integer"}, Sqrt[#x]&]}]]
EmbedCode[bundle]Properties & Relations (2)
A similar effect can be achieved by deploying and managing individual objects within a directory. Create a project directory:
dir = CreateDirectory[CloudObject["api-bundle"]]Deploy APIs inside the directory, one at a time:
CloudDeploy[APIFunction["n" -> "Integer", FactorInteger[#n]&], CloudObject["factor", dir]]
CloudDeploy[APIFunction["n" -> "Integer", PrimeQ[#n]&], CloudObject["primeq", dir]]The contents of the project directory are the deployed APIs:
CloudObjects[dir]The chief difference with this approach is that the objects inside the ExternalBundle are deployed in one step.
It is also possible to achieve a similar effect with URLDispatcher:
dispatch = CloudDeploy[URLDispatcher[{
"/factor" :> APIFunction["n" -> "Integer", FactorInteger[#n]&],
"/primeq" :> APIFunction["n" -> "Integer", PrimeQ[#n]&]
}]]The dispatcher is a single object that responds to a request based on the URL pattern that comes after the object's URL. Call the dispatcher with "/factor" after its URL to activate the factoring APIFunction:
URLExecute[CloudObject["factor", dispatch], {"n" -> 187}]Related Guides
History
Text
Wolfram Research (2014), ExternalBundle, Wolfram Language function, https://reference.wolfram.com/language/ref/ExternalBundle.html.
CMS
Wolfram Language. 2014. "ExternalBundle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExternalBundle.html.
APA
Wolfram Language. (2014). ExternalBundle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExternalBundle.html
BibTeX
@misc{reference.wolfram_2026_externalbundle, author="Wolfram Research", title="{ExternalBundle}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ExternalBundle.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_externalbundle, organization={Wolfram Research}, title={ExternalBundle}, year={2014}, url={https://reference.wolfram.com/language/ref/ExternalBundle.html}, note=[Accessed: 13-June-2026]}