Update structured labels

Update structured labels

Set structured labels for a sample. If a sample has structured labels the label column is ignored, and the sample is allowed to have multiple labels. An array of { startIndex, endIndex, label } needs to be passed in with labels for the complete sample (see valuesCount to get the upper bound). endIndex is inclusive. If you pass in an incorrect array (e.g. missing values) you'll get an error back.

POSThttps://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/{sampleId}/structured-labels
Path parameters
projectId*integer

Project ID

sampleId*integer

Sample ID

Body
structuredLabels*array of StructuredLabel (object)
Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

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

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/{sampleId}/structured-labels', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "structuredLabels": [
        {
          "label": "text"
        }
      ]
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated