Segment sample

Segment sample

Slice a sample into multiple segments. The original file will be marked as deleted, but you can crop any created segment to retrieve the original file.

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

Project ID

sampleId*integer

Sample ID

Body
segments*array of 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}/segment', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "segments": [
        {}
      ]
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated