devices_api module

DevicesApi

class edgeimpulse_api.api.devices_api.DevicesApi(
		api_client=None
)

Parameters

  • api_client=None

Methods

create_device

edgeimpulse_api.api.devices_api.create_device(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		create_device_request: edgeimpulse_api.models.create_device_request.CreateDeviceRequest,
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Create device

Create a new device. If you set ifNotExists to false and the device already exists, the deviceType will be overwritten.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • create_device_request: edgeimpulse_api.models.create_device_request.CreateDeviceRequest

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

delete_device

edgeimpulse_api.api.devices_api.delete_device(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Delete device

Delete a device. When this device sends a new message to ingestion or connects to remote management the device will be recreated.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

get_device

edgeimpulse_api.api.devices_api.get_device(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.get_device_response.GetDeviceResponse

Get device

Retrieves a single device

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.get_device_response.GetDeviceResponse

get_impulse_records

edgeimpulse_api.api.devices_api.get_impulse_records(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		get_impulse_records_request: edgeimpulse_api.models.get_impulse_records_request.GetImpulseRecordsRequest,
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Get impulse records

Retrieve impulse records from the device.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • get_impulse_records_request: edgeimpulse_api.models.get_impulse_records_request.GetImpulseRecordsRequest

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

keep_device_debug_stream_alive

edgeimpulse_api.api.devices_api.keep_device_debug_stream_alive(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		keep_device_debug_stream_alive_request: edgeimpulse_api.models.keep_device_debug_stream_alive_request.KeepDeviceDebugStreamAliveRequest,
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Keep debug stream alive

If you have opened a debug stream, ping this interface every 10 seconds to let us know to keep the debug stream open.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • keep_device_debug_stream_alive_request: edgeimpulse_api.models.keep_device_debug_stream_alive_request.KeepDeviceDebugStreamAliveRequest

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

list_devices

edgeimpulse_api.api.devices_api.list_devices(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.list_devices_response.ListDevicesResponse

Lists devices

List all devices for this project. Devices get included here if they connect to the remote management API or if they have sent data to the ingestion API and had the device_id field set.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.list_devices_response.ListDevicesResponse

rename_device

edgeimpulse_api.api.devices_api.rename_device(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		rename_device_request: edgeimpulse_api.models.rename_device_request.RenameDeviceRequest,
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Rename device

Set the current name for a device.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • rename_device_request: edgeimpulse_api.models.rename_device_request.RenameDeviceRequest

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

request_device_model_update

edgeimpulse_api.api.devices_api.request_device_model_update(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Trigger model update request

Trigger a model update request, this only works for devices connected to remote management server in inference mode.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

start_device_inference_debug_stream

edgeimpulse_api.api.devices_api.start_device_inference_debug_stream(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.start_device_debug_stream_response.StartDeviceDebugStreamResponse

Start inference debug stream

Start an inference debug stream for this device with inference results (and images if a camera is attached). Updates are streamed through the websocket API. A keep-alive token is returned, you'll need to ping the API (with keepDeviceDebugStreamAlive) every 10 seconds (so we know when the client is disconnected).

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.start_device_debug_stream_response.StartDeviceDebugStreamResponse

start_device_snapshot_debug_stream

edgeimpulse_api.api.devices_api.start_device_snapshot_debug_stream(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		start_device_snapshot_debug_stream_request: edgeimpulse_api.models.start_device_snapshot_debug_stream_request.StartDeviceSnapshotDebugStreamRequest,
		**kwargs
)> edgeimpulse_api.models.start_device_debug_stream_response.StartDeviceDebugStreamResponse

Start snapshot debug stream

Start a snapshot debug stream for this device with a current camera view. Updates are streamed through the websocket API. A keep-alive token is returned, you'll need to ping the API (with keepDeviceDebugStreamAlive) every 10 seconds (so we know when the client is disconnected).

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • start_device_snapshot_debug_stream_request: edgeimpulse_api.models.start_device_snapshot_debug_stream_request.StartDeviceSnapshotDebugStreamRequest

  • **kwargs

Return

edgeimpulse_api.models.start_device_debug_stream_response.StartDeviceDebugStreamResponse

start_sampling

edgeimpulse_api.api.devices_api.start_sampling(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		start_sampling_request: edgeimpulse_api.models.start_sampling_request.StartSamplingRequest,
		**kwargs
)> edgeimpulse_api.models.start_sampling_response.StartSamplingResponse

Start sampling

Start sampling on a device. This function returns immediately. Updates are streamed through the websocket API.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • start_sampling_request: edgeimpulse_api.models.start_sampling_request.StartSamplingRequest

  • **kwargs

Return

edgeimpulse_api.models.start_sampling_response.StartSamplingResponse

stop_device_debug_stream

edgeimpulse_api.api.devices_api.stop_device_debug_stream(
		self,
		project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})],
		stop_device_debug_stream_request: edgeimpulse_api.models.stop_device_debug_stream_request.StopDeviceDebugStreamRequest,
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Stop debug stream

If you have opened a debug stream, close it.

Parameters

  • self

  • project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • device_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Device ID', extra={})]

  • stop_device_debug_stream_request: edgeimpulse_api.models.stop_device_debug_stream_request.StopDeviceDebugStreamRequest

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

Last updated