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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Raritan PX2/PX3 JSON-RPC API: Raritan 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 PX2/PX3 JSON-RPC API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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&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="header">
<div class="headertitle">
<div class="title">Raritan JSON-RPC Software Development Kit </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Welcome to the Raritan JSON-RPC Software Development Kit! This archive contains libraries and documentation for developing programs using the JSON-RPC interface of Raritan product series PX2, PX3, BCM and EMX.</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>
<h2>What is JSON-RPC?</h2>
<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">{ "jsonrpc": "2.0", "method": "getConfiguration", "params": {}, "id": 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"> "jsonrpc": "2.0",</div><div class="line"> "result": {</div><div class="line"> "_ret_": {</div><div class="line"> "v2enable": true,</div><div class="line"> "v3enable": false,</div><div class="line"> "readComm": "public",</div><div class="line"> "writeComm": "",</div><div class="line"> "sysContact": "",</div><div class="line"> "sysName": "",</div><div class="line"> "sysLocation": ""</div><div class="line"> }</div><div class="line"> },</div><div class="line"> "id": 3</div><div class="line">}</div></div><!-- fragment --><h2>Important Interfaces</h2>
<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>
<h2>Client Libraries and Examples</h2>
<p>This SDK includes client libraries for using the Raritan 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 APIs of PX2 or EMX. 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>
<h3>Language Binding Feature Matrix</h3>
<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="markdownTableBody" 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="markdownTableBody" 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="markdownTableBody" 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="markdownTableBody" 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>
<h2>Formal Interface Defintion</h2>
<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 PX2/EMX-IDL to JSON-RPC</a> for more details about IDL and its mapping to JSON-RPC.</p>
<h2>Device-side Scripting With Lua</h2>
<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 the file LuaPLC_Introduction.pdf in the SDK top directors for more details. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Aug 21 2020 10:20:38 for Raritan PX2/PX3 JSON-RPC API by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
|