POST
/
api
/
{projectId}
/
device
/
{deviceId}
/
start-sampling
Start sampling
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/device/{deviceId}/start-sampling \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "label": "<string>",
  "lengthMs": 123,
  "category": "training",
  "intervalMs": 123,
  "sensor": "<string>",
  "labelColor": "<string>",
  "collectedSampleCount": 123,
  "targetSampleCount": 123
}'
{
  "success": true,
  "error": "<string>",
  "id": 123
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

deviceId
string
required

Device ID

Body

application/json
label
string
required

Label to be used during sampling.

lengthMs
integer
required

Requested length of the sample (in ms).

category
enum<string>
required

Which acquisition category to sample data into.

Available options:
training,
testing,
post-processing
intervalMs
number
required

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

sensor
string

The sensor to sample from.

labelColor
string

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

collectedSampleCount
number

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

targetSampleCount
number

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

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

error
string

Optional error description (set if 'success' was false)

id
integer