Start sampling

Start sampling

post

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

Authorizations
Path parameters
projectIdintegerRequired

Project ID

deviceIdstringRequired

Device ID

Body
labelstringRequired

Label to be used during sampling.

lengthMsintegerRequired

Requested length of the sample (in ms).

categorystring · enumRequired

Which acquisition category to sample data into.

Possible values:
intervalMsnumberRequired

Interval between samples (can be calculated like 1/hz * 1000)

sensorstringOptional

The sensor to sample from.

labelColorstringOptional

Text color of label displayed on supported clients. Value can be any supported CSS color value

collectedSampleCountnumberOptional

A hint to supported clients to show the number of samples currently collected

targetSampleCountnumberOptional

A hint to supported clients to show the desired number of samples to be collected

Responses
200
OK
application/json
Responseall of
post
POST /v1/api/{projectId}/device/{deviceId}/start-sampling HTTP/1.1
Host: studio.edgeimpulse.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 149

{
  "label": "text",
  "lengthMs": 1,
  "category": "training",
  "intervalMs": 1,
  "sensor": "text",
  "labelColor": "text",
  "collectedSampleCount": 1,
  "targetSampleCount": 1
}
200

OK

{
  "success": true,
  "error": "text",
  "id": 1
}

Last updated

Was this helpful?