curl --request POST \
--url https://api.eddy.engineer/v1/power.raw \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"blob": "<string>",
"include_document": true,
"name": "<string>",
"network": {},
"network_key": "<string>",
"project": "<string>",
"text": "<string>",
"variant": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/power.raw"
payload = {
"blob": "<string>",
"include_document": True,
"name": "<string>",
"network": {},
"network_key": "<string>",
"project": "<string>",
"text": "<string>",
"variant": "<string>"
}
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({
blob: '<string>',
include_document: true,
name: '<string>',
network: {},
network_key: '<string>',
project: '<string>',
text: '<string>',
variant: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/power.raw', 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.raw",
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([
'blob' => '<string>',
'include_document' => true,
'name' => '<string>',
'network' => [
],
'network_key' => '<string>',
'project' => '<string>',
'text' => '<string>',
'variant' => '<string>'
]),
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.raw"
payload := strings.NewReader("{\n \"blob\": \"<string>\",\n \"include_document\": true,\n \"name\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"text\": \"<string>\",\n \"variant\": \"<string>\"\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.raw")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"blob\": \"<string>\",\n \"include_document\": true,\n \"name\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"text\": \"<string>\",\n \"variant\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.raw")
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 \"blob\": \"<string>\",\n \"include_document\": true,\n \"name\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"text\": \"<string>\",\n \"variant\": \"<string>\"\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>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}PSS/E RAW: import a v33 or v35 case as a network document, or export a network as RAW v33 or v35
TP3. Import (text, or blob): every record group a consultant meets (buses, loads with their I and Z parts, fixed and switched shunts, machines, branches and zero-impedance lines, two- and three-winding transformers by CW, CZ and CM, areas, zones and owners, two-terminal and VSC DC, FACTS shunts); multi-terminal DC, GNE devices, induction machines and series FACTS refused by name and carried; revisions 34 and 36 refused (POWER_IMPORT_INVALID: “save as v33 or v35 from PSS/E”: no public, permissive description of either exists). The network is stored and validated, with its import findings. Export (a network by network, network_key or project, and revision 33 (the default) or 35): records read from RAW are written back exactly as read where they still make the network’s elements, rebuilt where they do not; the file is stored as a blob (file_key) and returned as text. Refused: POWER_REQUEST (400), POWER_IMPORT_INVALID (400), POWER_CAP (413), POWER_RAW_REVISION (422: a revision not written), POWER_DOCUMENT_INVALID (400), POWER_NETWORK_NOT_FOUND (404). TL3c: blob (a blob id) instead of text, read as the caller; both is 400 FILE_GIVEN_TWICE, a blob that is not text 400 BLOB_NOT_TEXT.
curl --request POST \
--url https://api.eddy.engineer/v1/power.raw \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"blob": "<string>",
"include_document": true,
"name": "<string>",
"network": {},
"network_key": "<string>",
"project": "<string>",
"text": "<string>",
"variant": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/power.raw"
payload = {
"blob": "<string>",
"include_document": True,
"name": "<string>",
"network": {},
"network_key": "<string>",
"project": "<string>",
"text": "<string>",
"variant": "<string>"
}
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({
blob: '<string>',
include_document: true,
name: '<string>',
network: {},
network_key: '<string>',
project: '<string>',
text: '<string>',
variant: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/power.raw', 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.raw",
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([
'blob' => '<string>',
'include_document' => true,
'name' => '<string>',
'network' => [
],
'network_key' => '<string>',
'project' => '<string>',
'text' => '<string>',
'variant' => '<string>'
]),
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.raw"
payload := strings.NewReader("{\n \"blob\": \"<string>\",\n \"include_document\": true,\n \"name\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"text\": \"<string>\",\n \"variant\": \"<string>\"\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.raw")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"blob\": \"<string>\",\n \"include_document\": true,\n \"name\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"text\": \"<string>\",\n \"variant\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.raw")
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 \"blob\": \"<string>\",\n \"include_document\": true,\n \"name\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"text\": \"<string>\",\n \"variant\": \"<string>\"\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>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
Import: the RAW file's contents
Response
Import: direction import, key, blob_uri, name, counts, validation, format psse_raw, origin, import_findings, import_findings_count, document. Export: direction export, revision, network_key, file_key, blob_uri, file_name, bytes, export_findings, export_findings_count, text
The response is of type object.