File: index.html

package info (click to toggle)
raritan-json-rpc-sdk 4.0.20%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 57,236 kB
  • sloc: cs: 223,121; perl: 117,786; python: 26,872; javascript: 6,544; makefile: 27
file content (145 lines) | stat: -rw-r--r-- 10,544 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Raritan / Server Technology Xerus™ PDU JSON-RPC API: Xerus™ JSON-RPC Software Development Kit</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Raritan / Server Technology Xerus™ PDU JSON-RPC API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Xerus™ JSON-RPC Software Development Kit </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="mainpage"></a></p>
<p>Welcome to the Xerus™ JSON-RPC Software Development Kit! This archive contains libraries and documentation for developing programs using the JSON-RPC interface of Raritan power products.</p>
<p>Raritan devices expose their full functionality via a JSON-RPC API. This API can be used for remote control, mass configuration or integration with other systems. All interfaces are formally defined in IDL (interface definition language) files.</p>
<h1><a class="anchor" id="autotoc_md0"></a>
What is JSON-RPC?</h1>
<p><a href="http://json-rpc.org/">JSON-RPC</a> is a HTTP-based remote prodecure call (RPC) protocol. Client programs send <a href="http://www.json.org">JSON</a>-encoded requests to a URL on the server. The server performs the requested operation and responds with either a response object or an error object, also encoded in JSON.</p>
<p>For example, a client might send the following request object to the <code>/snmp</code> URL to invoke the <code>getConfiguration</code> method:</p>
<div class="fragment"><div class="line">{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;getConfiguration&quot;, &quot;params&quot;: {}, &quot;id&quot;: 3 }</div>
</div><!-- fragment --><p>The server will respond with the following object containing the active configuration of the SNMP agent:</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    &quot;jsonrpc&quot;: &quot;2.0&quot;,</div>
<div class="line">    &quot;result&quot;: {</div>
<div class="line">        &quot;_ret_&quot;: {</div>
<div class="line">            &quot;v2enable&quot;: true,</div>
<div class="line">            &quot;v3enable&quot;: false,</div>
<div class="line">            &quot;readComm&quot;: &quot;public&quot;,</div>
<div class="line">            &quot;writeComm&quot;: &quot;&quot;,</div>
<div class="line">            &quot;sysContact&quot;: &quot;&quot;,</div>
<div class="line">            &quot;sysName&quot;: &quot;&quot;,</div>
<div class="line">            &quot;sysLocation&quot;: &quot;&quot;</div>
<div class="line">        }</div>
<div class="line">    },</div>
<div class="line">    &quot;id&quot;: 3</div>
<div class="line">}</div>
</div><!-- fragment --><p>All JSON-RPC requests must be directed to a URL on the device's HTTPS service. The path component of this URL is called resource ID (RID). See <a class="el" href="well_known_rids.html">Well-Known Resource IDs</a> for a list of resource IDs that serve as entry points into the API.</p>
<h1><a class="anchor" id="autotoc_md1"></a>
Important Interfaces</h1>
<p>The following pages introduce the interfaces required for some typical use cases:</p>
<ul>
<li><a class="el" href="pdumodel.html">PDU Data Model</a></li>
<li><a class="el" href="peripherals.html">Peripheral Devices</a></li>
<li><a class="el" href="devsettings.html">Device Settings</a></li>
<li><a class="el" href="eventengine.html">Event Rules and Actions</a></li>
<li><a class="el" href="servermon.html">Server Reachability Monitoring</a></li>
<li><a class="el" href="eventservice.html">Event Service</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md2"></a>
Client Libraries and Examples</h1>
<p>This SDK includes client libraries for using the Xerus™ JSON-RPC API in programs written in the <a href="https://www.perl.org">Perl</a>, <a href="https://www.python.org">Python</a> and <a href="http://www.java.com">Java</a> programming languages. Those libraries are described on the following pages. Additionally, examples are given for sending raw JSON-RPC requests using the <a href="https://curl.haxx.se">cURL command-line HTTP client</a>.</p>
<p>Please note that some examples given may not be applicable to the product this API documentation was released for. Examples use the API of PDU. Nevertheless the principles of the API usage is identical for either product.</p>
<ul>
<li><a class="el" href="curl_example.html">Curl JSON-RPC Example</a></li>
<li><a class="el" href="perl_client.html">Perl JSON-RPC Client Binding</a></li>
<li><a class="el" href="python_client.html">Python JSON-RPC Client Binding</a></li>
<li><a class="el" href="java_client.html">Java JSON-RPC Client Binding</a></li>
<li><a class="el" href="dotnet_client.html">C# / .NET JSON-RPC Client Binding</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md3"></a>
Language Binding Feature Matrix</h2>
<p>The following special features are supported by the provided language bindings:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Language   </th><th class="markdownTableHeadCenter">Basic Auth   </th><th class="markdownTableHeadCenter">Session Auth   </th><th class="markdownTableHeadCenter">Synchronous API   </th><th class="markdownTableHeadCenter">Asynchronous API   </th><th class="markdownTableHeadCenter">Multi-Version   </th><th class="markdownTableHeadCenter">Bulk RPC    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Perl   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">no   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">no    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Python   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">no   </td><td class="markdownTableBodyCenter">no   </td><td class="markdownTableBodyCenter">yes    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Java   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">C# / .NET   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td><td class="markdownTableBodyCenter">yes   </td></tr>
</table>
<h1><a class="anchor" id="autotoc_md4"></a>
Formal Interface Defintion</h1>
<p>All interfaces, methods and data structures are formally defined in IDL files. These definitions are the source for the provided client libraries.</p>
<p>See <a class="el" href="idlmapping.html">Rules and Mechanism for Mapping Xerus™-IDL to JSON-RPC</a> for more details about IDL and its mapping to JSON-RPC.</p>
<p>See <a class="el" href="idl_versions.html">IDL Interface Versioning</a> for details about interface version numbers.</p>
<h1><a class="anchor" id="autotoc_md5"></a>
Device-side Scripting With Lua</h1>
<p>Recent versions of the Raritan firmware include an interpreter for the Lua programming language. This interpreter can be used to execute user-provided scripts directly on the device without need for a client PC. Lua scripts can access the IDL API, both on the unit they're running on and on remote units. Please see <a class="el" href="luaplc.html">LuaPLC</a> for more details. </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Oct 17 2022 00:25:44 for Raritan / Server Technology Xerus™ PDU JSON-RPC API by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>