GettingStarted-Appendix2
Appendix 2 to Getting Started
Nordomatic API examples
Below are examples of the most common methods.
All examples are recorded with Fiddler.
Requests (except login) are the entire request, not just the body.
The response is only the body.
Login
Request:
POST https://nostromo.styrportalen.se/NordomaticApi/Core/api/Login HTTP/1.1
Host: nostromo.styrportalen.se
Connection: keep-alive
Origin: https://nostromo.styrportalen.se
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Content-Type: application/json; charset=UTF-8
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7
x-clientID: <UUID>
x-securityToken: <A LONG TOKEN>
x-sessionID: <SESSION ID>
Body:
{
"userName": "demo",
"password": "demo2010",
"isDomainUser": false,
"clientId": "34D36E41-CD44-4D4E-2724-1D7745EC9382"
}
Response:
{
"SessionID": "...",
"SecurityToken": "...",
"DBVersion": { "Release": 3, "Major": 43, "Minor": 0 },
"Authorization": { ... }
}
WriteSecuredValueByToken
Request:
POST https://nostromo.styrportalen.se/NordomaticApi/Core/api/WriteSecuredSignalValuesByToken HTTP/1.1
Content-Type: application/json; charset=UTF-8
x-clientID: <UUID>
x-securityToken: <A LONG TOKEN>
x-sessionID: <SESSION ID>
...rest of headers
Body:
{
"securityToken": "...",
"values": [ { "Name": "WFSInternal_UID2_WD", "Value": "34D36E41-CD44-4D4E-2724-1D7745EC9382\\DefaultProject" } ]
}
GetOnlineAlarmsByToken
Request:
POST https://nostromo.styrportalen.se/NordomaticApi/Core/api/GetOnlineAlarmsByToken/3/40 HTTP/1.1
Content-Type: application/json; charset=UTF-8
x-clientID: <UUID>
x-securityToken: <A LONG TOKEN>
x-sessionID: <SESSION ID>
...rest of headers
Body:
{
"securityToken": "...",
"filter": { ... }
}
Response:
[
{ "AlarmTag": "DEMO_AS02_LB01_RVĂ…1_L", "AlarmSymbolicText": "Summary alarm heat exchanger", ... },
...
]
RegisterSignalsByToken
Request:
POST https://nostromo.styrportalen.se/NordomaticApi/Core/api/RegisterSignalsByToken HTTP/1.1
Content-Type: application/json; charset=UTF-8
x-clientID: <UUID>
x-securityToken: <A LONG TOKEN>
x-sessionID: <SESSION ID>
...rest of headers
Body:
{
"securityToken": "...",
"sessionId": "...",
"clientId": "...",
"signalNames": [ "DEMO_AS02_LB01_GT31_MV", ... ]
}
Response:
{
"data": [ { "key": "DEMO_AS02_LB01_GT31_MV", "status": 0, "isAuthorized": true }, ... ]
}