curl --request POST \
--url https://api.eddy.engineer/v1/power.dynamics.traces.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"base_mva": 123,
"columns": [
{}
],
"delimiter": "<string>",
"description": "<string>",
"events": [
{}
],
"header": {},
"import": {},
"include_document": true,
"invented": true,
"name": "<string>",
"nominal_hz": 123,
"preset": "<string>",
"run": "<string>",
"text": "<string>",
"time": {},
"time_shift_s": 123,
"tool": "<string>",
"traces": {}
}
'import requests
url = "https://api.eddy.engineer/v1/power.dynamics.traces.import"
payload = {
"base_mva": 123,
"columns": [{}],
"delimiter": "<string>",
"description": "<string>",
"events": [{}],
"header": {},
"import": {},
"include_document": True,
"invented": True,
"name": "<string>",
"nominal_hz": 123,
"preset": "<string>",
"run": "<string>",
"text": "<string>",
"time": {},
"time_shift_s": 123,
"tool": "<string>",
"traces": {}
}
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({
base_mva: 123,
columns: [{}],
delimiter: '<string>',
description: '<string>',
events: [{}],
header: {},
import: {},
include_document: true,
invented: true,
name: '<string>',
nominal_hz: 123,
preset: '<string>',
run: '<string>',
text: '<string>',
time: {},
time_shift_s: 123,
tool: '<string>',
traces: {}
})
};
fetch('https://api.eddy.engineer/v1/power.dynamics.traces.import', 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://api.eddy.engineer/v1/power.dynamics.traces.import",
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([
'base_mva' => 123,
'columns' => [
[
]
],
'delimiter' => '<string>',
'description' => '<string>',
'events' => [
[
]
],
'header' => [
],
'import' => [
],
'include_document' => true,
'invented' => true,
'name' => '<string>',
'nominal_hz' => 123,
'preset' => '<string>',
'run' => '<string>',
'text' => '<string>',
'time' => [
],
'time_shift_s' => 123,
'tool' => '<string>',
'traces' => [
]
]),
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://api.eddy.engineer/v1/power.dynamics.traces.import"
payload := strings.NewReader("{\n \"base_mva\": 123,\n \"columns\": [\n {}\n ],\n \"delimiter\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {}\n ],\n \"header\": {},\n \"import\": {},\n \"include_document\": true,\n \"invented\": true,\n \"name\": \"<string>\",\n \"nominal_hz\": 123,\n \"preset\": \"<string>\",\n \"run\": \"<string>\",\n \"text\": \"<string>\",\n \"time\": {},\n \"time_shift_s\": 123,\n \"tool\": \"<string>\",\n \"traces\": {}\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://api.eddy.engineer/v1/power.dynamics.traces.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"base_mva\": 123,\n \"columns\": [\n {}\n ],\n \"delimiter\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {}\n ],\n \"header\": {},\n \"import\": {},\n \"include_document\": true,\n \"invented\": true,\n \"name\": \"<string>\",\n \"nominal_hz\": 123,\n \"preset\": \"<string>\",\n \"run\": \"<string>\",\n \"text\": \"<string>\",\n \"time\": {},\n \"time_shift_s\": 123,\n \"tool\": \"<string>\",\n \"traces\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.dynamics.traces.import")
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 \"base_mva\": 123,\n \"columns\": [\n {}\n ],\n \"delimiter\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {}\n ],\n \"header\": {},\n \"import\": {},\n \"include_document\": true,\n \"invented\": true,\n \"name\": \"<string>\",\n \"nominal_hz\": 123,\n \"preset\": \"<string>\",\n \"run\": \"<string>\",\n \"text\": \"<string>\",\n \"time\": {},\n \"time_shift_s\": 123,\n \"tool\": \"<string>\",\n \"traces\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Import traces (`ss.power.traces/1`): a PSS/E or PSCAD export or a test record as CSV, or an engine run
DY15: a CSV with its stated mapping (each column’s element, quantity and unit; units converted on import with the stated bases and checked), from PSS/E channel exports, PSCAD output files or commissioning test records (preset with columns, or the whole import); or a traces document; or an engine run named by its power_dynamics_simulate result key, run again from its record and checked against the key. Stored by content key for power_dynamics_traces_compare. Refused by name: POWER_REQUEST (400: not exactly one source, no mapping), POWER_SETTINGS (400: a mapping that does not read), DYNAMICS_DOCUMENT_INVALID (400), 422 with the importer’s own code (TRACE_TIME_INVALID, TRACE_COLUMN_MISSING, TRACE_HEADER_MISSING, …) where the file gives no traces, POWER_DYNAMICS_NOT_FOUND (404: run names no simulation), POWER_DYNAMICS_RUN_DIFFERS (422).
curl --request POST \
--url https://api.eddy.engineer/v1/power.dynamics.traces.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"base_mva": 123,
"columns": [
{}
],
"delimiter": "<string>",
"description": "<string>",
"events": [
{}
],
"header": {},
"import": {},
"include_document": true,
"invented": true,
"name": "<string>",
"nominal_hz": 123,
"preset": "<string>",
"run": "<string>",
"text": "<string>",
"time": {},
"time_shift_s": 123,
"tool": "<string>",
"traces": {}
}
'import requests
url = "https://api.eddy.engineer/v1/power.dynamics.traces.import"
payload = {
"base_mva": 123,
"columns": [{}],
"delimiter": "<string>",
"description": "<string>",
"events": [{}],
"header": {},
"import": {},
"include_document": True,
"invented": True,
"name": "<string>",
"nominal_hz": 123,
"preset": "<string>",
"run": "<string>",
"text": "<string>",
"time": {},
"time_shift_s": 123,
"tool": "<string>",
"traces": {}
}
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({
base_mva: 123,
columns: [{}],
delimiter: '<string>',
description: '<string>',
events: [{}],
header: {},
import: {},
include_document: true,
invented: true,
name: '<string>',
nominal_hz: 123,
preset: '<string>',
run: '<string>',
text: '<string>',
time: {},
time_shift_s: 123,
tool: '<string>',
traces: {}
})
};
fetch('https://api.eddy.engineer/v1/power.dynamics.traces.import', 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://api.eddy.engineer/v1/power.dynamics.traces.import",
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([
'base_mva' => 123,
'columns' => [
[
]
],
'delimiter' => '<string>',
'description' => '<string>',
'events' => [
[
]
],
'header' => [
],
'import' => [
],
'include_document' => true,
'invented' => true,
'name' => '<string>',
'nominal_hz' => 123,
'preset' => '<string>',
'run' => '<string>',
'text' => '<string>',
'time' => [
],
'time_shift_s' => 123,
'tool' => '<string>',
'traces' => [
]
]),
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://api.eddy.engineer/v1/power.dynamics.traces.import"
payload := strings.NewReader("{\n \"base_mva\": 123,\n \"columns\": [\n {}\n ],\n \"delimiter\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {}\n ],\n \"header\": {},\n \"import\": {},\n \"include_document\": true,\n \"invented\": true,\n \"name\": \"<string>\",\n \"nominal_hz\": 123,\n \"preset\": \"<string>\",\n \"run\": \"<string>\",\n \"text\": \"<string>\",\n \"time\": {},\n \"time_shift_s\": 123,\n \"tool\": \"<string>\",\n \"traces\": {}\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://api.eddy.engineer/v1/power.dynamics.traces.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"base_mva\": 123,\n \"columns\": [\n {}\n ],\n \"delimiter\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {}\n ],\n \"header\": {},\n \"import\": {},\n \"include_document\": true,\n \"invented\": true,\n \"name\": \"<string>\",\n \"nominal_hz\": 123,\n \"preset\": \"<string>\",\n \"run\": \"<string>\",\n \"text\": \"<string>\",\n \"time\": {},\n \"time_shift_s\": 123,\n \"tool\": \"<string>\",\n \"traces\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.dynamics.traces.import")
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 \"base_mva\": 123,\n \"columns\": [\n {}\n ],\n \"delimiter\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {}\n ],\n \"header\": {},\n \"import\": {},\n \"include_document\": true,\n \"invented\": true,\n \"name\": \"<string>\",\n \"nominal_hz\": 123,\n \"preset\": \"<string>\",\n \"run\": \"<string>\",\n \"text\": \"<string>\",\n \"time\": {},\n \"time_shift_s\": 123,\n \"tool\": \"<string>\",\n \"traces\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
The whole mapping (DY15's CsvImport): name, source (psse | pscad | test_record | other), delimiter, header ({line: n} | {first_field_starts_with: text} | "none"), time {column, unit}, columns [{column (1-based index or header text), element, quantity (p_pu, q_pu, v_pu, i_pu, f_hz, freq_dev_pu, angle_deg, ...), unit (MW, Mvar, kV, pu, Hz, ...), base_kv}], events, time_shift_s, base_mva, nominal_hz, invented
The CSV file's contents
Response
schema, key, blob_uri, name, ok, the findings (errors, warnings, findings), channels [{element, quantity, unit, name}], rows, span_s, events, source, from (csv | document | run), and document when asked
The response is of type object.