Crop sample

Crop sample

Crop a sample to within a new range.

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

Project ID

sampleId*integer

Sample ID

Body
cropStart*integer

New start index of the sample

Example: 0
cropEnd*integer

New end index of the sample

Example: 128
Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

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

requiresProcessing*boolean
Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/{sampleId}/crop', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "cropStart": 0,
      "cropEnd": 128
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text",
  "requiresProcessing": false
}

Last updated