"WolframWebEngine" (Service Connection)
-
See Also
- ServiceExecute
- ServiceConnect
- ServiceDeploy
-
- Service Connections
- WolframApplicationServer
-
-
See Also
- ServiceExecute
- ServiceConnect
- ServiceDeploy
-
- Service Connections
- WolframApplicationServer
-
See Also
"WolframWebEngine" (Service Connection)
Connecting & Authenticating
ServiceConnect["WolframWebEngine",server] creates a connection to the specified instance of Wolfram Web Engine. An authentication dialog might appear, depending on the configuration.
Requests
ServiceExecute[ServiceObject["WolframWebEngine",…],"request",params] sends a request to the Wolfram Web Engine API using parameters params. The following give possible requests.
Information
"ListActiveResources" — returns a list of currently deployed active resources
"GetResource" — imports a resource in the current session; if the resource is active this effectively calls Get
| "URL" | (required) | the URL for the resource |
Deployment
"DeployResource" — deploy a resource
| "Payload" | (required) | a Wolfram Language expression or a static file | |
| "URL" | uuid | the URL for the resource (defaults to a UUID) |
Deletion
"DeleteResource" — deletes a resource
| "URL" | (required) | the URL for the resource |
Examples
Basic Examples (1)
so = ServiceConnect["WolframWebEngine", "http://deployer:password@localhost:8010/webengine"]List the active resources on the web engine:
ServiceExecute[so, "ListActiveResources"]Deploy a new resource, in this case, an APIFunction:
ServiceDeploy[so, APIFunction[{"x" -> "Number"}, 3#x + 1&], "test"]After deployment, the resource is now available to use:
ServiceExecute[so, "ListActiveResources"]Call the deployed APIFunction with a specific value for x:
URLExecute[
URLBuild["http://localhost:8010/webengine/active/test", {"x" -> 42}]]Delete the resource when you no longer need it:
ServiceExecute[so, "DeleteResource", {"URL" -> "active/test"}]See Also
ServiceExecute ▪ ServiceConnect ▪ ServiceDeploy
Service Connections: WolframApplicationServer