---
title: "Get metadata"
method: GET
path: "/api/{projectId}/dsp/{dspId}/metadata"
tags: ["DSP"]
---

# Get metadata

`GET /api/{projectId}/dsp/{dspId}/metadata`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/metadata`
- 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/metadata/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve the metadata from a generated DSP block.

## Path parameters

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

## Query parameters

- `excludeIncludedSamples` boolean
- `category` 'training' | 'testing' | 'validation' | 'all'

## Response `200`

OK

- DSPMetadataResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `created` string, date-time, required: Date when the features were created
  - `generated` boolean, required: Whether features were generated
  - `dspConfig` object, required
  - `labels` string[], required: Labels in the dataset when generator ran
  - `featureLabels` string[]: Names of the generated features. Only set if axes have explicit labels.
  - `windowCount` integer, required
  - `featureCount` integer, required: Number of features for this DSP block
  - `includedSamples` object[], required: The included samples in this DSP block. Note that these are sorted in the same way as the `npy` files are laid out. So with the `windowCount` parameter you can exactly search back to see which file contributed to which windows there.
    - `id` integer, required
    - `windowCount` integer, required
  - `windowSizeMs` integer, required: Length of the sliding window when generating features.
  - `windowIncreaseMs` integer, required: Increase of the sliding window when generating features.
  - `padZeros` boolean, required: Whether data was zero-padded when generating features.
  - `frequency` number, required: Frequency of the original data in Hz.
  - `outputConfig` object, required: Information about the output of the DSP block
    - `type` 'image' | 'spectrogram' | 'flat', required: Output type of the DSP block
    - `shape` object, required: The shape of the block output
      - `width` integer, required: Available on all types. Denotes the width of an 'image' or 'spectrogram', or the number of features in a 'flat' block.
      - `height` integer: Only available for type 'image' and 'spectrogram'
      - `channels` integer: Only available for type 'image'
      - `frames` integer: Number of frames, only available for type 'image'
  - `fftUsed` integer[]
  - `resamplingAlgorithmVersion` number: The version number of the resampling algorithm used (for resampled time series data only)
  - `featureExplorerJobId` integer: When specified, a job is running (asynchronously) to generate the feature explorer.
  - `featureExplorerJobFailed` boolean: If this is set, then the feature explorer job failed (get the status by getting the job logs for 'featureExplorerJobId').
  - `featureImportanceJobId` integer: When specified, a job is running (asynchronously) to generate feature importance.
  - `featureImportanceJobFailed` boolean: If this is set, then the feature importance job failed (get the status by getting the job logs for 'featureImportanceJobId').

---

[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)
