Get processed sample (from features array)
curl --request POST \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"features": [
123
],
"params": {
"scale-axes": "10"
},
"drawGraphs": true,
"requestPerformance": true
}
'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run"
payload = {
"features": [123],
"params": { "scale-axes": "10" },
"drawGraphs": True,
"requestPerformance": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
features: [123],
params: {'scale-axes': '10'},
drawGraphs: true,
requestPerformance: true
})
};
fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run', 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}/dsp/{dspId}/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'features' => [
123
],
'params' => [
'scale-axes' => '10'
],
'drawGraphs' => true,
'requestPerformance' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run"
payload := strings.NewReader("{\n \"features\": [\n 123\n ],\n \"params\": {\n \"scale-axes\": \"10\"\n },\n \"drawGraphs\": true,\n \"requestPerformance\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"features\": [\n 123\n ],\n \"params\": {\n \"scale-axes\": \"10\"\n },\n \"drawGraphs\": true,\n \"requestPerformance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"features\": [\n 123\n ],\n \"params\": {\n \"scale-axes\": \"10\"\n },\n \"drawGraphs\": true,\n \"requestPerformance\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"features": [
123
],
"graphs": [
{
"name": "Frequency domain",
"type": "<string>",
"image": "<string>",
"imageMimeType": "<string>",
"X": {
"accX": [
3,
5,
7
],
"accY": [
2,
1,
5
]
},
"y": [
0,
0.5,
1
],
"suggestedXMin": 123,
"suggestedXMax": 123,
"suggestedYMin": 123,
"suggestedYMax": 123,
"lineWidth": 123,
"smoothing": true,
"axisLabels": {
"X": "<string>",
"y": "<string>"
},
"highlights": {}
}
],
"error": "<string>",
"labels": [
"<string>"
],
"state_string": "<string>",
"performance": {
"latency": 123,
"ram": 123,
"customDspString": "<string>"
}
}Get processed sample (from features array)
Takes in a features array and runs it through the DSP block. This data should have the same frequency as set in the input block in your impulse.
POST
/
api
/
{projectId}
/
dsp
/
{dspId}
/
run
Get processed sample (from features array)
curl --request POST \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"features": [
123
],
"params": {
"scale-axes": "10"
},
"drawGraphs": true,
"requestPerformance": true
}
'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run"
payload = {
"features": [123],
"params": { "scale-axes": "10" },
"drawGraphs": True,
"requestPerformance": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
features: [123],
params: {'scale-axes': '10'},
drawGraphs: true,
requestPerformance: true
})
};
fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run', 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}/dsp/{dspId}/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'features' => [
123
],
'params' => [
'scale-axes' => '10'
],
'drawGraphs' => true,
'requestPerformance' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run"
payload := strings.NewReader("{\n \"features\": [\n 123\n ],\n \"params\": {\n \"scale-axes\": \"10\"\n },\n \"drawGraphs\": true,\n \"requestPerformance\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"features\": [\n 123\n ],\n \"params\": {\n \"scale-axes\": \"10\"\n },\n \"drawGraphs\": true,\n \"requestPerformance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/dsp/{dspId}/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"features\": [\n 123\n ],\n \"params\": {\n \"scale-axes\": \"10\"\n },\n \"drawGraphs\": true,\n \"requestPerformance\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"features": [
123
],
"graphs": [
{
"name": "Frequency domain",
"type": "<string>",
"image": "<string>",
"imageMimeType": "<string>",
"X": {
"accX": [
3,
5,
7
],
"accY": [
2,
1,
5
]
},
"y": [
0,
0.5,
1
],
"suggestedXMin": 123,
"suggestedXMax": 123,
"suggestedYMin": 123,
"suggestedYMax": 123,
"lineWidth": 123,
"smoothing": true,
"axisLabels": {
"X": "<string>",
"y": "<string>"
},
"highlights": {}
}
],
"error": "<string>",
"labels": [
"<string>"
],
"state_string": "<string>",
"performance": {
"latency": 123,
"ram": 123,
"customDspString": "<string>"
}
}Authorizations
ApiKeyAuthenticationJWTAuthenticationJWTHttpHeaderAuthenticationOAuth2
Path Parameters
Body
application/json
Response
200 - application/json
OK
Was this page helpful?