Edit labels for multiple samples

Edit labels for multiple samples

post

Sets the label (also known as class) of multiple samples. Depending on the number of affected samples this will either execute immediately or return the ID of a job that will perform this action in batches.

Authorizations
Path parameters
projectIdintegerRequired

Project ID

Query parameters
categorystring · enumRequired

Which of the three acquisition categories to retrieve data from

Possible values:
labelsstringOptional

Only include samples with a label within the given list of labels, given as a JSON string

Example: ["idle", "snake"]
filenamestringOptional

Only include samples whose filename includes the given filename

maxLengthintegerOptional

Only include samples shorter than the given length, in milliseconds

minLengthintegerOptional

Only include samples longer than the given length, in milliseconds

minFrequencynumberOptional

Only include samples with higher frequency than given frequency, in hertz

maxFrequencynumberOptional

Only include samples with lower frequency than given frequency, in hertz

signatureValiditystring · enumOptional

Include samples with either valid or invalid signatures

Possible values:
includeDisabledstring · enumOptional

Include only enabled or disabled samples (or both)

Possible values:
idsstringOptional

Only include samples with an ID within the given list of IDs, given as a JSON string

Example: [1, 2, 3]
excludeIdsstringOptional

Exclude samples with an ID within the given list of IDs, given as a JSON string

Example: [4, 5, 6]
minLabelnumberOptional

Only include samples with a label >= this value

maxLabelnumberOptional

Only include samples with a label < this value

searchstringOptional

Search query

Example: <id> <name>
dataTypestring · enumOptional

Include only samples with a particular data type

Possible values:
minIdnumberOptional

Include only samples with an ID >= this value

maxIdnumberOptional

Include only samples with an ID < this value

metadatastringOptional

Filter samples by metadata key-value pairs, provided as a JSON string. Each filter item in the list is combined using a logical OR. To include samples without any metadata, use: { "no_metadata": true }.

Example: ["[{ \"key\": \"locationId\", \"op\": \"eq\", \"values\": [\"buildingA\"] }, { \"key\": \"deviceId\", \"op\": \"neq\", \"values\": [\"val1\", \"val2\"] }]","[{ \"key\": \"distance\", \"op\": \"eq\", \"values\": [\"1.5\", \"2.9\"], \"key\": \"comments\", exclude: [\"faulty\"] }]","[{ \"key\": \"nullKeyExample\", \"op\": \"eq\" }]","[{ \"key\": \"presentKeyExample\", \"op\": \"neq\" }]","[{ \"no_metadata\": true }]"]
minDatestring · date-timeOptional

Only include samples that where added after the date given

Example: 2023-01-01T00:00:00.000Z
maxDatestring · date-timeOptional

Only include samples that were added before the date given

Example: 2024-12-31T00:00:00.000Z
Body
labelstringOptional

New label for this sample

Example: water-hammer
Responses
200
OK
application/json
Responseany of
or
all ofOptional
post
POST /v1/api/{projectId}/raw-data/batch/edit-labels HTTP/1.1
Host: studio.edgeimpulse.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "label": "water-hammer"
}
200

OK

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

Last updated

Was this helpful?