Skip to main content
GET
/
api
/
{projectId}
/
raw-data
/
data-quality
/
diversity
Get diversity metrics data
curl --request GET \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity \
  --header 'x-api-key: <api-key>'
import requests

url = "https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/raw-data/data-quality/diversity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "error": "<string>",
  "data": [
    {
      "maxDistance": 123,
      "clusterInfos": [
        {
          "idx": 123,
          "indexes": [
            123
          ],
          "windows": [
            [
              123
            ]
          ],
          "vendiScore": 123,
          "vendiRatio": 123,
          "count": 123,
          "distance": 123,
          "leftIdx": 123,
          "rightIdx": 123,
          "samples": [
            {
              "id": 2,
              "filename": "idle01.d8Ae",
              "signatureValidate": true,
              "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,
              "deviceType": "<string>",
              "sensors": [
                {
                  "index": 123,
                  "name": "accX",
                  "units": "<string>"
                }
              ],
              "valuesCount": 123,
              "added": "2023-11-07T05:31:56Z",
              "boundingBoxes": [
                {
                  "label": "<string>",
                  "x": 123,
                  "y": 123,
                  "width": 123,
                  "height": 123
                }
              ],
              "isDisabled": true,
              "isProcessing": true,
              "processingError": true,
              "isCropped": true,
              "projectId": 123,
              "sha256Hash": "<string>",
              "datastreams": [
                {
                  "index": 123,
                  "intervalMs": 123,
                  "frequencyHz": 123,
                  "sensors": [
                    {
                      "index": 123,
                      "name": "accX",
                      "units": "<string>"
                    }
                  ],
                  "valuesCount": 123,
                  "totalLengthMs": 123,
                  "imageDimensions": {
                    "width": 123,
                    "height": 123
                  }
                }
              ],
              "signatureMethod": "HS256",
              "signatureKey": "<string>",
              "deviceName": "<string>",
              "totalLengthMs": 123,
              "thumbnailVideo": "<string>",
              "thumbnailVideoFull": "<string>",
              "processingJobId": 123,
              "processingErrorString": "<string>",
              "metadata": {},
              "projectOwnerName": "<string>",
              "projectName": "<string>",
              "structuredLabels": [
                {
                  "startIndex": 123,
                  "endIndex": 123,
                  "label": "<string>",
                  "labelMap": {
                    "type": "key-values",
                    "labels": {}
                  }
                }
              ],
              "structuredLabelsList": [
                "<string>"
              ],
              "createdBySyntheticDataJobId": 123,
              "imageDimensions": {
                "width": 123,
                "height": 123
              },
              "videoUrl": "<string>",
              "videoUrlFull": "<string>",
              "labelMap": {
                "type": "key-values",
                "labels": {}
              },
              "lastUpdatedBy": {
                "type": "user",
                "id": 123
              }
            }
          ]
        }
      ],
      "labelId": 123
    }
  ]
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

error
string

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

data
object[]