diff --git a/docs/DEVELOPER/dev-tools/external-control-api.md b/docs/DEVELOPER/dev-tools/external-control-api.md index ffcf3478..0f259dc5 100644 --- a/docs/DEVELOPER/dev-tools/external-control-api.md +++ b/docs/DEVELOPER/dev-tools/external-control-api.md @@ -147,7 +147,7 @@ The external control services provided by ECP are included in a simple RESTful A Developer mode enabled

Control by mobile apps setting "Enabled" query/app-object-counts/<channelId>

Available since Roku OS 13.0Returns the counts for the different BrightScript node objects in the app. This helps developers determine the counts of each type of object held by their Brightscript app.

The app may either be a sideloaded app or an app from the Streaming Store. To output the results for an app in the app store, the device must be keyed with the same developer ID/key that was used to generate the package file.Developer mode enabled

Control by mobile apps setting "Enabled" query/app-state/<appId>

Available since Roku OS 13.0Returns the current app state: "active", "background" (suspended; running in the background), or "inactive".

The app may either be a sideloaded app or an app from the Streaming Store. To output the results for an app in the app store, the device must be keyed with the same developer ID/key that was used to generate the package file.

If the app is not installed, this command returns an error.Developer mode enabled

Control by mobile apps setting "Enabled" - exit-app

(POST request)

Available since Roku OS 13.0Suspends or terminates an app that is running:
Developer mode enabled

Control by mobile apps setting "Enabled" + exit-app/<channelId>[/true]

(POST request)

Available since Roku OS 13.0Suspends or terminates an app that is running:
Developer mode enabled

Control by mobile apps setting "Enabled" inputSends custom events to the current application. It takes a user defined list of name-value pairs sent as query string URI parameters. The external control server places these name-value pairs into an associative array, and passes them directly through to the currently executing app script using a Message Port attached to a created roInput object.

[Input Command Conventions](doc:external-control-api#input-command-conventions) includes detailed recommendations on how to pass your data.

Messages of type [roInputEvent](doc:roinputevent) have a GetInfo() method that will obtain the associative array. The arguments must be URL-encoded.

This command is sent using an HTTP POST with no body. Example: POST /input?acceleration.x=0.0&acceleration.y=0.0&acceleration.z=9.8 @@ -619,10 +619,10 @@ The response includes the following fields: #### exit-app example -The following command suspends or terminates an app that is running. +The following command suspends or terminates an app that is running. The optional `/true` parameter will force the termination of the app even if it supports instant-resume. Without this, an instant-resume channel will remain running in the background. ```bash -$ curl -d '' "http://$ROKU_DEV_TARGET:8060/exit-app/" +$ curl -d '' "http://$ROKU_DEV_TARGET:8060/exit-app/[/true]" ``` This command returns an HTTP 200 success code if the app was active or suspended. It returns an HTTP 404 (Not Found) error if the app was not running.