const response = await fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/impulse', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"inputBlocks": [
{
"type": "time-series",
"name": "Time series",
"title": "Time series",
"primaryVersion": false
}
],
"dspBlocks": [
{
"type": "spectral-analysis",
"name": "Spectral features",
"axes": [
"accX"
],
"title": "Spectral Analysis",
"primaryVersion": false
}
],
"learnBlocks": [
{
"type": "anomaly",
"name": "NN Classifier",
"dsp": [
27
],
"title": "Classification (Keras)",
"primaryVersion": false
}
]
}),
});
const data = await response.json();