DeviceLocalEvent
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/devices/{device_registration_id}/local_events |
create |
Completion event recorded |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
created, err := client.DeviceLocalEvent(nil).Create(map[string]any{"device_id": "example", "organization_id": "example", "event": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local created, err = client:DeviceLocalEvent():create({ device_id = "example", organization_id = "example", event = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->DeviceLocalEvent()->create(["device_id" => "example", "organization_id" => "example", "event" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.DeviceLocalEvent().create({ "device_id": "example", "organization_id": "example", "event": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.DeviceLocalEvent.create({ "device_id" => "example", "organization_id" => "example", "event" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.DeviceLocalEvent().create({ device_id: "example", organization_id: "example", event: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
event |
string |
Yes | Event |
recorded |
boolean |
Yes | Recorded |
create
POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/local_events
Operation ID: local_events_api_v1_organization_device.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
device_registration_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
event |
enum: device_local_enabled, device_local_disabled, device_background_enabled, device_background_disabled |
Yes |
Responses
200: Completion event recorded
application/json
| Property | Type | Required | Description |
|---|---|---|---|
recorded |
boolean |
Yes |