Get a window of raw sample features from cache, after a live classification job has completed.
curl --request GET \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex} \
--header 'x-api-key: <api-key>'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex}"
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}/classify/v2/{sampleId}/raw-data/{windowIndex}', 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}/classify/v2/{sampleId}/raw-data/{windowIndex}",
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}/classify/v2/{sampleId}/raw-data/{windowIndex}"
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}/classify/v2/{sampleId}/raw-data/{windowIndex}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex}")
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,
"sample": {
"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
}
},
"payload": {
"device_type": "DISCO-L475VG-IOT01A",
"sensors": [
{
"index": 123,
"name": "accX",
"units": "<string>"
}
],
"values": [
[
123
]
],
"intervalMs": 16,
"frequencyHz": 62.5,
"device_name": "ac:87:a3:0a:2d:1b",
"cropStart": 0,
"cropEnd": 128
},
"totalPayloadLength": 123,
"error": "<string>"
}Get a window of raw sample features from cache, after a live classification job has completed.
Get raw sample features for a particular window. This is only available after a live classification job has completed and raw features have been cached.
GET
/
api
/
{projectId}
/
classify
/
v2
/
{sampleId}
/
raw-data
/
{windowIndex}
Get a window of raw sample features from cache, after a live classification job has completed.
curl --request GET \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex} \
--header 'x-api-key: <api-key>'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex}"
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}/classify/v2/{sampleId}/raw-data/{windowIndex}', 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}/classify/v2/{sampleId}/raw-data/{windowIndex}",
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}/classify/v2/{sampleId}/raw-data/{windowIndex}"
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}/classify/v2/{sampleId}/raw-data/{windowIndex}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex}")
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,
"sample": {
"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
}
},
"payload": {
"device_type": "DISCO-L475VG-IOT01A",
"sensors": [
{
"index": 123,
"name": "accX",
"units": "<string>"
}
],
"values": [
[
123
]
],
"intervalMs": 16,
"frequencyHz": 62.5,
"device_name": "ac:87:a3:0a:2d:1b",
"cropStart": 0,
"cropEnd": 128
},
"totalPayloadLength": 123,
"error": "<string>"
}Authorizations
ApiKeyAuthenticationJWTAuthenticationJWTHttpHeaderAuthenticationOAuth2
Path Parameters
Project ID
Sample ID
Sample window index
Query Parameters
Index of the datastream, if omitted this will resolve to 0.
Impulse ID. If this is unset then the default impulse is used.
If true, only a slice of labels will be returned for samples with multiple labels.
Response
200 - application/json
OK
Whether the operation succeeded
Show child attributes
Show child attributes
If multiple payloads are present (one per datastream) this returns the first datastream.
Show child attributes
Show child attributes
Total number of payload values
Optional error description (set if 'success' was false)
Was this page helpful?
⌘I