Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:mervis-scada:50-api [2023/09/26 14:19] v.kohout [List of basic API methods] |
en:mervis-scada:50-api [2025/07/24 08:46] (current) m.skrivanek [api/v2/get/authenticate] |
||
---|---|---|---|
Line 7: | Line 7: | ||
^Function^Description| | ^Function^Description| | ||
+ | ^api/ | ||
^api/ | ^api/ | ||
^api/ | ^api/ | ||
Line 35: | Line 36: | ||
===== Examples ===== | ===== Examples ===== | ||
- | ====api/ | + | ====api/ |
+ | |||
+ | **Request** | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | |||
+ | <code javascript> | ||
+ | {" | ||
+ | </ | ||
+ | |||
+ | or with the full name (with the domain and login name) | ||
+ | |||
+ | <code javascript> | ||
+ | {" | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | * token (string) - Authentication token for calling other API methods. | ||
+ | * tokenValidFor (TimeSpan) - The duration for which the provided token is valid. This value is not returned if a token wasn't provided or if its validity period isn't configured. Example: " | ||
+ | * changePwdBefore (DateTime or null) - If present, this specifies the date and time by which the current password must be changed. This period is determined by the domain' | ||
+ | * notifyNearingPwdExpirationIn (TimeSpan or null) - If present, this indicates how long before the password expires (refer to changePwdBefore) a notification should be displayed to the user. Example: " | ||
+ | |||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }</ | ||
+ | ====[Deprecated] | ||
+ | |||
+ | This is deprecated API method. Use api/ | ||
**Request** | **Request** | ||
Line 41: | Line 92: | ||
* URL: / | * URL: / | ||
* Method: POST | * Method: POST | ||
+ | |||
<code javascript> | <code javascript> | ||
{" | {" | ||
+ | </ | ||
+ | |||
+ | or with the full name (with an escaped backslash between the domain and login name) | ||
+ | |||
+ | <code javascript> | ||
+ | {" | ||
</ | </ | ||
Line 243: | Line 301: | ||
</ | </ | ||
+ | ==== api/ | ||
- | ==== [Depricated] api/ | + | **Request** |
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | * You should always use token (" | ||
+ | * " | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * " | ||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | * Values | ||
+ | * v - value | ||
+ | * ts - timestamp - start of the value validity period | ||
+ | * gt - goodthrough - end of the value validity period | ||
+ | * i - interval | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== [Deprecated] api/ | ||
**Request** | **Request** | ||
Line 441: | Line 650: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | <code xml><? | ||
+ | < | ||
+ | |||
+ | ====api/ | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | * Content-Type: | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | <values projId=" | ||
+ | <dps> | ||
+ | <d id=" | ||
+ | < | ||
+ | <p n=" | ||
+ | < | ||
+ | </p> | ||
+ | </ | ||
+ | </d> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
**Response** | **Response** | ||
Line 618: | Line 857: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ====api/ | ||
+ | |||
+ | To get the list of projects. | ||
+ | |||
+ | **Request** | ||
+ | |||
+ | * URL: / | ||
+ | * Method: POST | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Response** | ||
+ | |||
+ | <code xml><? | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | <project id=" | ||
+ | <loc> | ||
+ | <n1:gps lat=" | ||
+ | </ | ||
+ | <mdi> | ||
+ | <mi n2: | ||
+ | <mi n3: | ||
+ | </ | ||
+ | </ | ||
+ | <project id=" | ||
+ | <mdi> | ||
+ | <mi r: | ||
+ | <mi r: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </mi> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
===== Matlab Client ===== | ===== Matlab Client ===== | ||
==== General notes client function parameters ==== | ==== General notes client function parameters ==== |