POST
/
api
/
{projectId}
/
dsp
/
{dspId}
/
raw-data
/
{sampleId}
/
slice
/
run
Get processed sample (slice)
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/raw-data/{sampleId}/slice/run \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "params": {
    "scale-axes": "10"
  },
  "store": true
}'
{
  "success": true,
  "error": "<string>",
  "features": [
    123
  ],
  "graphs": [
    {
      "name": "Frequency domain",
      "image": "<string>",
      "imageMimeType": "<string>",
      "X": {
        "accX": [
          3,
          5,
          7
        ],
        "accY": [
          2,
          1,
          5
        ]
      },
      "y": [
        0,
        0.5,
        1
      ],
      "suggestedXMin": 123,
      "suggestedXMax": 123,
      "suggestedYMin": 123,
      "suggestedYMax": 123,
      "type": "<string>",
      "lineWidth": 123,
      "smoothing": true,
      "axisLabels": {
        "X": "<string>",
        "y": "<string>"
      },
      "highlights": {}
    }
  ],
  "labels": [
    "<string>"
  ],
  "state_string": "<string>",
  "labelAtEndOfWindow": "<string>",
  "labelForWindow": "<string>",
  "sample": {
    "sample": {
      "id": 2,
      "filename": "idle01.d8Ae",
      "signatureValidate": true,
      "signatureMethod": "HS256",
      "signatureKey": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "lastModified": "2023-11-07T05:31:56Z",
      "category": "training",
      "coldstorageFilename": "<string>",
      "label": "healthy-machine",
      "intervalMs": 16,
      "frequency": 62.5,
      "originalIntervalMs": 16,
      "originalFrequency": 62.5,
      "deviceName": "<string>",
      "deviceType": "<string>",
      "sensors": [
        {
          "name": "accX",
          "units": "<string>"
        }
      ],
      "valuesCount": 123,
      "totalLengthMs": 123,
      "added": "2023-11-07T05:31:56Z",
      "boundingBoxes": [
        {
          "label": "<string>",
          "x": 123,
          "y": 123,
          "width": 123,
          "height": 123
        }
      ],
      "boundingBoxesType": "object_detection",
      "chartType": "chart",
      "thumbnailVideo": "<string>",
      "thumbnailVideoFull": "<string>",
      "isDisabled": true,
      "isProcessing": true,
      "processingJobId": 123,
      "processingError": true,
      "processingErrorString": "<string>",
      "isCropped": true,
      "metadata": {},
      "projectId": 123,
      "projectOwnerName": "<string>",
      "projectName": "<string>",
      "projectLabelingMethod": "single_label",
      "sha256Hash": "<string>",
      "structuredLabels": [
        {
          "startIndex": 123,
          "endIndex": 123,
          "label": "<string>"
        }
      ],
      "structuredLabelsList": [
        "<string>"
      ],
      "createdBySyntheticDataJobId": 123,
      "imageDimensions": {
        "width": 123,
        "height": 123
      },
      "videoUrl": "<string>",
      "videoUrlFull": "<string>"
    },
    "payload": {
      "device_name": "ac:87:a3:0a:2d:1b",
      "device_type": "DISCO-L475VG-IOT01A",
      "sensors": [
        {
          "name": "accX",
          "units": "<string>"
        }
      ],
      "values": [
        [
          123
        ]
      ],
      "cropStart": 0,
      "cropEnd": 128
    },
    "totalPayloadLength": 123
  },
  "performance": {
    "latency": 123,
    "ram": 123,
    "customDspString": "<string>"
  },
  "canProfilePerformance": true
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

dspId
integer
required

DSP Block ID, use the impulse functions to retrieve the ID

sampleId
integer
required

Sample ID

Query Parameters

sliceStart
integer
required

Begin index of the slice

sliceEnd
integer

End index of the slice. If not given, the sample will be sliced to the same length as the impulse input block window length.

Body

application/json
params
object
required

DSP parameters with values

Example:
{ "scale-axes": "10" }
store
boolean
required

Whether to store the DSP parameters as the new default parameters.

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

features
number[]
required

Array of processed features. Laid out according to the names in 'labels'

graphs
object[]
required

Graphs to plot to give an insight in how the DSP process ran

sample
object
required
canProfilePerformance
boolean
required
error
string

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

labels
string[]

Labels of the feature axes

state_string
string

String representation of the DSP state returned

labelAtEndOfWindow
string

DEPRECATED. Label at the end of the window (only present for time-series data)

labelForWindow
string

Label for the window. How the label is chosen is dependent on the value of "labelingMethodMultiLabel" in the input block.

performance
object