Remote actions
Remote actions let you, your support team or your customer in the portal ask one running copy of your app to do something: open a project, switch on verbose logging, sign out, refresh a cache. An action is data only, a name and a few parameters that you define in advance. Nothing is ever executed by the SDK, and the platform never sends code (protocol, section 6.17).
Define the actions
Define each action once per product and environment with POST /v1/products/{id}/remote-action-types (scope products:write), at most 100:
{
"name": "open_project",
"title": {"en": "Open a project", "de": "Projekt öffnen"},
"params": {
"path": {"type": "string", "required": true, "max_length": 200},
"read_only": {"type": "boolean"}
},
"customer_allowed": false
}
| Field | Meaning |
|---|---|
name |
a-z, 0-9 and _, starting with a letter, up to 64 characters. It never changes. |
title, description |
Optional, in English and German, shown in the dashboard and the portal. |
params |
Up to 10 parameters by name (like an action name, up to 32 characters). |
customer_allowed |
Whether your customers may send the action to their own devices from the portal. Off by default. |
A parameter has a type of string, integer or boolean and may be required. Integers take minimum and maximum; strings take max_length (1 to 200, default 200) and enum, a list of up to 20 allowed values. Strings never contain control characters.
You can also manage definitions in the dashboard, in the "Remote actions" section of the product page.
Send an action
Send an action to one device with POST /v1/licenses/{id}/activations/{activation_id}/remote-actions (scope activations:write):
{"name": "open_project", "params": {"path": "Reports/2026.xlsx"}, "ttl_s": 3600}
The server checks the parameters against the definition and refuses unknown names (unknown_action) and parameters that do not fit (invalid_params). The action waits until the app fetches it or ttl_s passes (60 seconds to 7 days, default one day). At most 50 actions wait per device. DELETE /v1/remote-actions/{id} cancels a waiting action, and the list per device shows each action as pending, delivered, cancelled or expired.
In the dashboard, the "Remote actions" tab of a license shows the actions of each bound device, sends new ones and cancels those still waiting. Customers find "Send action" next to each of their devices in the portal, for the actions you marked customer_allowed; their actions wait the default one day and show sent_by: customer.
In the app
Embed the definitions your app accepts, the answer of GET /v1/products/{id}/remote-action-types, and hand them to the client. Then fetch the waiting actions, for example after each heartbeat:
let client = Client::new(config)?
.with_action_schema(include_str!("remote-actions.json"))?;
for action in client.remote_actions()? {
match action.name.as_str() {
"open_project" => {
if let Some(path) = action.params.get("path").and_then(|v| v.as_str()) {
open(path);
}
}
_ => {}
}
}
remote_actions() returns up to 20 actions per call, oldest first; call it again until the list is empty. Each action comes once: the server marks it delivered when it hands it out. The SDK checks every action again against your embedded definitions and drops each one with an unknown name, parameters that do not fit or an expiry in the past. A definition you widen on the server later therefore cannot make an older app accept more than it was built for. Each action carries id, name, params, sent_by (vendor or customer), issued_at and expires_at.
The call needs an activation and a usable license and does not renew the license token. Treat parameters like any input from outside: a path is a value to look up in your app, not a file to open blindly.
Other languages
The C API and the wrappers offer the same calls. Pass the embedded definitions when you create the client, then fetch:
// C
lsdk_config_set_action_schema(config, schema_json);
lsdk_remote_action_list *actions = NULL;
lsdk_client_remote_actions(client, &actions); // lsdk_remote_action_list_name(actions, i), ..._params_json(actions, i)
lsdk_remote_action_list_free(actions);
// C++
config.set_action_schema(schema_json);
for (const auto& a : client.remote_actions()) {
if (a.name == "open_project") open_project(a.params_json);
}
// C#
var client = new LicenseClient(new LicenseOptions { /* ... */ ActionSchema = schemaJson });
foreach (var a in await client.RemoteActionsAsync())
if (a.Name == "open_project") OpenProject(a.Params.GetProperty("path").GetString());
# Python
client = LicenseClient(..., action_schema=schema_json)
for a in client.remote_actions():
if a.name == "open_project":
open_project(a.params["path"])
// Java
LicenseClient client = new LicenseClient(LicenseOptions.builder() /* ... */ .actionSchema(schemaJson).build());
for (RemoteAction a : client.remoteActions()) {
if (a.name().equals("open_project")) openProject((String) a.params().get("path"));
}
C and C++ hand over the parameters as JSON text, C# as a JsonElement, Python as a dict and Java as a Map (or paramsJson()). sent_by is vendor or customer; issued_at and expires_at are Unix seconds in C and C++ and dates in the other languages. Details per language: C, C++, C#, Python, Java.