---
title: "Get the interval (in ms) of the training data"
method: GET
path: "/api/{projectId}/data-interval"
tags: ["Projects"]
---

# Get the interval (in ms) of the training data

`GET /api/{projectId}/data-interval`

## Request

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

Get the interval of the training data; if multiple intervals are present,
the interval of the longest data item is returned. This only takes data in your _training_ set into account.

## Path parameters

- `projectId` integer, required

## Query parameters

- `datasetVersionId` integer

## Response `200`

OK

- ProjectDataIntervalResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `intervalMs` number, required
  - `frequencyHz` number, required
  - `byDatastream` object[], required: Only filled if project has "multi_datastreams" experiment enabled. Otherwise an empty array.
    - `type` 'video' | 'image' | 'time-series' | 'features', required
    - `intervalMs` number, required
    - `frequencyHz` number, required
    - `sensors` object[], required
      - `name` string, required: Name of the axis
      - `units` string, required: Type of data on this axis. Needs to comply to SenML units (see https://www.iana.org/assignments/senml/senml.xhtml).

---

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