Jun 9, 2026

ActionStreamer

How to Automate Actions via the API

If you already have devices online, the next useful step is automation: make the platform trigger the right action without a manual click every time.

In ActionStreamer, the automation primitive is an event preset. A preset stores the action you want to run, the target device or device group, and the parameters needed to execute it later.

This post shows the basic workflow:

  • Create an event preset

  • List the presets for a device

  • Run a preset on demand

  • Optionally set a preset to run at device startup

If you are using the Python SDK, the wrapper handles request signing for you once you provide your access key and secret key. If you are calling the API directly, use the same HMAC SHA256 signing flow from the authentication post.

What You Need

  • An authenticated session or a signed API request

  • A device ID, or a device group ID if you are automating a group

  • The event type you want to run

  • The event parameters for that action

What An Event Preset Is

An event preset is a reusable definition of an action.

Instead of building the same event payload every time, you save the action once and run it again later. That is useful when you want to:

  • Start a stream

  • Trigger a camera action

  • Apply the same operation across multiple devices

  • Run an action automatically when a device comes online

Step 1: Create The Preset

Use POST /v1/eventpreset to create the automation.

Example request:

POST /v1/eventpreset HTTP/1.1
Authorization: <your-session-or-signed-request>
Content-Type: application/json

{
  "eventPresetName": "Start Live Stream",
  "deviceID": 12345,
  "deviceGroupID": 0,
  "agentType": "Video",
  "eventType": "Video_Start_RTMP",
  "eventParameters": "{

Example request:

The important part is that eventParameters is a JSON string. If you leave it empty, the API stores {}.

If you are automating a single device, use deviceID. If you are automating a device group, use deviceGroupID instead.

Typical response fields include:

  • key

  • eventPresetName

  • deviceID

  • deviceGroupID

  • agentTypeID

  • eventTypeID

  • eventParameters

  • priority

  • maxAttempts

  • expirationEpoch

  • creationDate

  • createdBy

Step 2: List The Presets For A Device

Use GET /v1/eventpreset/list/device/{deviceID} when you want to see what presets already exist for a device.

Example request:

GET /v1/eventpreset/list/device/12345 HTTP/1.1
Authorization: <your-session-or-signed-request>

This is the easiest way to confirm that a preset was created successfully before you try to run it.

Step 3: Run The Preset

Use POST /v1/eventpreset/run/{eventPresetID} to create an event from the preset.

Example request:

POST /v1/eventpreset/run/67890 HTTP/1.1
Authorization: <your-session-or-signed-request>
Content-Type: application/json

{
  "data"

The data array is optional. If you include it, you can override the target device list for that run.

If you leave the body empty, the preset runs against the device or group already stored on the preset.

Typical response:

{
  "EventID": 98765
}

That EventID is the event created from the preset. You can use it with the normal event endpoints if you want to check status or progress later.

Step 4: Run It Automatically At Startup

If you want the device to apply the preset automatically when it comes online, use:

  • POST /v1/eventpreset/startupevent/online/{eventPresetID}

  • POST /v1/eventpreset/startupevent/standalone/{eventPresetID}

The online version stores the preset as the device’s startup preset for the online mode. The standalone version stores the preset as a local startup action for standalone mode.

Example request:

POST /v1/eventpreset/startupevent/online/67890 HTTP/1.1
Authorization: <your-session-or-signed-request>

Startup presets must target a single device. If you try to apply one to a device group preset, the API rejects it.

Typical response:

{
  "EventID": 0
}

For the online case, the important outcome is that the preset is now attached to the device startup flow.

How The Python SDK Fits In

If you are using the Python SDK, you do not need to sign these requests by hand.

The SDK takes the access key and secret key in its config object, then handles signing in the wrapped calls. The automation workflow stays the same either way. The only difference is whether you build the request yourself or let the wrapper do it.

Why This Matters

Event presets are the easiest way to turn a repeated device action into a reusable API workflow.

Once you have a preset, you can:

  • Trigger the same action on demand

  • Apply the same action to multiple devices

  • Attach an action to device startup

  • Keep your automation logic in one place instead of spreading it across your app

ActionStreamer
ActionStreamer