---
title: "Anomaly information"
method: GET
path: "/api/{projectId}/training/anomaly/{learnId}"
tags: ["Learn"]
---

# Anomaly information

`GET /api/{projectId}/training/anomaly/{learnId}`

## Request

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

Get information about an anomaly block, such as its dependencies. Use the impulse blocks to find the learnId.

## Path parameters

- `projectId` integer, required
- `learnId` integer, required

## Response `200`

OK

- AnomalyConfigResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `dependencies` DependencyData, required
    - `classes` string[], required: Set of all labels present in data feeding into this model
    - `classesPerKey` object: Per-key class info for DSP blocks operating on label map datasets
    - `blockNames` string[], required
    - `featureCount` integer, required
    - `sampleCount` integer, required
    - `outputClasses` string[], required: Set of output classes for this model
  - `name` string, required
  - `axes` object[], required: Selectable axes for the anomaly detection block
    - `ix` integer, required
    - `label` string, required
    - `selected` boolean, required
    - `favourite` boolean, required
  - `trained` boolean, required: Whether the block is trained
  - `clusterCount` integer: Number of clusters for K-means, or number of components for GMM (in config)
  - `selectedAxes` integer[], required: Selected clusters (in config)
  - `minimumConfidenceRating` number, required: DEPRECATED, see "thresholds" instead. Minimum confidence rating for this block, scores above this number will be flagged as anomaly.
  - `thresholds` BlockThreshold[], required: List of configurable thresholds for this block.
    - `key` string, required: Identifier to reference the threshold. You'll need to refer to the threshold by this key when you set the threshold).
    - `description` string, required: User-friendly description of the threshold.
    - `helpText` string, required: Additional help text (shown in the UI under a "?" icon)
    - `suggestedValue` number: If the threshold has a suggested value, e.g. a max. absolute error for regression projects; or the min. anomaly score for visual anomaly detection, then this is the numeric value of that threshold.
    - `suggestedValueText` string: If the threshold has a suggested value, e.g. a max. absolute error for regression projects; or the min. anomaly score for visual anomaly detection, then this is the stringified value of that threshold.
    - `value` union, required: Current value of the threshold
      - number
      - string
    - `dropdownOptions` object[]: Optional list of options, will be shown in a dropdown.
      - `description` string, required: Full description of the value
      - `value` string, required: Value, maps back to "BlockThreshold#value"

---

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