---
title: "Features for sample"
method: GET
path: "/api/{projectId}/dsp/{dspId}/features/get-graph/classification/{sampleId}"
tags: ["DSP"]
---

# Features for sample

`GET /api/{projectId}/dsp/{dspId}/features/get-graph/classification/{sampleId}`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/features/get-graph/classification/{sampleId}`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/:projectId/dsp/:dspId/features/get-graph/classification/:sampleId/get.ts> (a function with typed inputs; its response is checked against the schema)

Runs the DSP block against a sample. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and run the DSP function for every window that is extracted.

## Path parameters

- `projectId` integer, required
- `dspId` integer, required
- `sampleId` integer, required

## Response `200`

OK

- DspSampleFeaturesResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `totalSampleCount` integer, required: Total number of windows in the data set
  - `data` object[], required
    - `X` number[], required: Feature data for this window
    - `y` integer, required: Training label index
    - `yLabel` string, required: Training label string
    - `sample` object
      - `id` integer, required
      - `name` string, required
      - `startMs` number, required
      - `endMs` number, required
  - `skipFirstFeatures` integer, required: When showing the processed features, skip the first X features. This is used in dimensionality reduction where artificial features are introduced in the response (on the first few positions).

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
