ServiceDeploy[service, expr]
deploys expr to an anonymous service deployment.
ServiceDeploy[service, expr,location]
deploys expr to the specified location.
ServiceDeploy[service,expr,assoc]
deploys expr to the location specified by assoc
ServiceDeploy
ServiceDeploy[service, expr]
deploys expr to an anonymous service deployment.
ServiceDeploy[service, expr,location]
deploys expr to the specified location.
ServiceDeploy[service,expr,assoc]
deploys expr to the location specified by assoc
Details and Options
- The service for ServiceDeploy can be specified by a ServiceObject returned from ServiceConnect, or directly by name and the URL for the server.
- If a connection to service is not found, ServiceDeploy will try to establish a new connection. If multiple connections to service exist, it will use the most recent one.
- ServiceDeploy returns a ServiceDeployment object that includes all the details on how to reach the deployment, this typically includes a URL.
- ServiceDeploy allows the following option:
-
IncludeDefinitions True whether to automatically include dependencies
Examples
open all close allBasic Examples (3)
Deploy a simple APIFunction to a Wolfram Application Server:
was = ServiceConnect["WolframApplicationServer", "http://was.example.com"]deployment = ServiceDeploy[was, APIFunction[{"name"}, StringJoin[{"Hello ", #name, "!"}]&]]ServiceDeployment[Association["Name" -> "WolframApplicationServer",
"URL" -> "http://was.example.com/8be95245-c0f0-4a85-abcd-d6d086d23d13",
"Endpoint" -> "8be95245-c0f0-4a85-abcd-d6d086d23d13",
"Resource" -> "8be95245-c0f0-4a85-abcd-d6d086 ... , "canonicalBaseURL" -> "http://was.example.com",
"restartURL" -> "http://was.example.com/.applicationserver/kernel/restart",
"wasVersion" -> "3.2", "wolframEngineVersion" -> "13.2.1"],
"Service" -> "WolframApplicationServer"]]]Once the application has been deployed, it can be called using URLRead:
URLRead[HTTPRequest[deployment, <|"Query" -> {"name" -> "World"}|>], {"StatusCode", "Body"}]Information can be used to see more details about the deployment:
Information[deployment]DeleteObject can be used to delete the deployment:
DeleteObject[deployment]Deploy a FormFunction to a named URL on Wolfram Web Engine:
wwe = ServiceConnect["WolframWebEngine", "http://wwe.example.com"]ServiceDeploy[wwe, FormFunction[{"x" -> "String"}, StringReverse[#x]&], "form"]Deploy a static expression while specifying details of the deployment on Wolfram Application Server:
was = ServiceConnect["WolframApplicationServer", "http://was.example.com"]
ServiceObject[Association["ConnectionID" -> "d4fa565e-7c66-4951-9335-53a43d169030",
"Name" -> "WolframApplicationServer", "URL" -> "http://was.example.com", "ConnectedQ" -> True,
"Service" -> "WolframApplicationServer"]]ServiceDeploy[was, ExampleData[{"TestImage", "House"}], <|"Resource" -> "example/house.png", "Endpoint" -> "resource/house", "ResourceType" -> "StaticWebElement"|>]Options (1)
IncludeDefinitions (1)
With IncludeDefinitions False, deployed expressions are responsible for setting up their own definitions:
foo = # ^ 2&;deployment = ServiceDeploy[was, APIFunction[{"x" -> "Number"}, foo[#x]&], "foo", IncludeDefinitions -> False]The deployed API can be invoked by accessing the deployment in a web browser and appending ?x=10 to its URL:
Text
Wolfram Research (2021), ServiceDeploy, Wolfram Language function, https://reference.wolfram.com/language/ref/ServiceDeploy.html (updated 2023).
CMS
Wolfram Language. 2021. "ServiceDeploy." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/ServiceDeploy.html.
APA
Wolfram Language. (2021). ServiceDeploy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ServiceDeploy.html
BibTeX
@misc{reference.wolfram_2026_servicedeploy, author="Wolfram Research", title="{ServiceDeploy}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/ServiceDeploy.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_servicedeploy, organization={Wolfram Research}, title={ServiceDeploy}, year={2023}, url={https://reference.wolfram.com/language/ref/ServiceDeploy.html}, note=[Accessed: 13-June-2026]}