Legrand / Raritan / Server Technology Xerus™ JSON-RPC API: BulkRequest.idl Source File

Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
BulkRequest.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2010 Raritan Inc. All rights reserved.
4 */
5
6/** Bulk RPC */
7module bulkrpc {
8
9 /** JSON-RPC Request (old format) */
10 structure Request {
11 string rid; ///< JSON resource ID (URI path)
12 string json; ///< Request in JSON-RPC format
13 };
14
15 /** JSON-RPC Response (old format) */
16 structure Response {
17 string json; ///< Response in JSON-RPC format
18 int statcode; ///< HTTP Status Code
19 };
20
21 /** Plain JSON object; used without further encoding in JSON-RPC requests */
22 opaque JsonObject;
23
24 /** Bulk Request Interface */
25 interface BulkRequest {
26
27 /** JSON-RPC Request */
28 structure Request {
29 string rid; ///< JSON resource ID (URI path)
30 JsonObject json; ///< Request in JSON-RPC format
31 };
32
33 /** JSON-RPC Response */
34 structure Response {
35 JsonObject json; ///< Response in JSON-RPC format
36 int statcode; ///< HTTP Status Code
37 };
38
39 /**
40 * Performs a Bulk Request in old format (deprectated).
41 *
42 * Bulk requests are used to perform multiple JSON-RPC requests at
43 * once, i.e. with a single HTTP POST request.
44 *
45 * @param requests List of RPC requests
46 * @param responses Result: List of RPC responses
47 */
48 void performRequest(in vector<bulkrpc.Request> requests,
49 out vector<bulkrpc.Response> responses);
50
51 /**
52 * Performs a Bulk Request.
53 *
54 * Bulk requests are used to perform multiple JSON-RPC requests at
55 * once, i.e. with a single HTTP POST request.
56 *
57 * @param requests List of RPC requests
58 * @param responses Result: List of RPC responses
59 */
60 void performBulk(in vector<Request> requests,
61 out vector<Response> responses);
62
63 /**
64 * Performs a Bulk Request with Timeout.
65 *
66 * @warning This method is currently not supported!
67 *
68 * Bulk requests are used to perform multiple JSON-RPC requests at
69 * once, i.e. with a single HTTP POST request. Processing will be
70 * aborted early if the timeout is exceeded. In this case the response
71 * list will be shorter than the requests list. Requests without
72 * response have not been processed and must be resent.
73 *
74 * @param requests List of RPC requests
75 * @param responses Result: List of RPC responses
76 * @param timeoutMs Maximum processing time in milliseconds
77 *
78 * @note Requests are processed atomically, and the timeout is only
79 * checked between requests. The total processing time may be
80 * slightly longer than the specified timeout.
81 */
82 void performBulkTimeout(in vector<Request> requests,
83 out vector<Response> responses,
84 in int timeoutMs);
85
86 };
87}
bulkrpc::BulkRequest
Bulk Request Interface.
Definition BulkRequest.idl:25
bulkrpc::BulkRequest::performBulk
void performBulk(in vector< Request > requests, out vector< Response > responses)
Performs a Bulk Request.
bulkrpc::BulkRequest::performRequest
void performRequest(in vector< bulkrpc::Request > requests, out vector< bulkrpc::Response > responses)
Performs a Bulk Request in old format (deprectated).
bulkrpc::BulkRequest::performBulkTimeout
void performBulkTimeout(in vector< Request > requests, out vector< Response > responses, in int timeoutMs)
Performs a Bulk Request with Timeout.
bulkrpc
Bulk RPC.
Definition BulkRequest.idl:7
bulkrpc::JsonObject
opaque JsonObject
Plain JSON object; used without further encoding in JSON-RPC requests.
Definition BulkRequest.idl:22
bulkrpc::BulkRequest::Request
JSON-RPC Request.
Definition BulkRequest.idl:28
bulkrpc::BulkRequest::Request::rid
string rid
JSON resource ID (URI path)
Definition BulkRequest.idl:29
bulkrpc::BulkRequest::Request::json
JsonObject json
Request in JSON-RPC format.
Definition BulkRequest.idl:30
bulkrpc::BulkRequest::Response
JSON-RPC Response.
Definition BulkRequest.idl:34
bulkrpc::BulkRequest::Response::statcode
int statcode
HTTP Status Code.
Definition BulkRequest.idl:36
bulkrpc::BulkRequest::Response::json
JsonObject json
Response in JSON-RPC format.
Definition BulkRequest.idl:35
bulkrpc::Request
JSON-RPC Request (old format)
Definition BulkRequest.idl:10
bulkrpc::Request::rid
string rid
JSON resource ID (URI path)
Definition BulkRequest.idl:11
bulkrpc::Request::json
string json
Request in JSON-RPC format.
Definition BulkRequest.idl:12
bulkrpc::Response
JSON-RPC Response (old format)
Definition BulkRequest.idl:16
bulkrpc::Response::statcode
int statcode
HTTP Status Code.
Definition BulkRequest.idl:18
bulkrpc::Response::json
string json
Response in JSON-RPC format.
Definition BulkRequest.idl:17