2
REQUESTS
1
Introduction
R
The MultiConnect
statistics, and issuing commands. This document provides information on the design, patterns, and methods
within the rCell API. The Appendix of this document has additional information for those unfamiliar with the
REST architecture or JSON data format. For additional examples and use-cases, explore the JavaScript within
the rCell website, specifically https://[rcell ip]/js/api.js.
2
Requests
All API requests will be directed to the https://[rcell ip]/api url. The majority of requests follow the same RESTful
pattern. Following the api url will be a collection name or a command directive. For example, information on
the current DHCP settings can be found in the DHCP collection at https://[rcell ip]/api/dhcp. A full list of
collections and commands can be found in section 4. For all examples in this document, the rCell's IP address is
192.168.2.1.
2.1
Making Requests
The RESTful interface allows users to retrieve data, add data, update data, and delete data using call methods:
GET, POST, PUT and DELETE, respectively. These methods can be set in the HTTP header, or they can be
set in the URI using the key: method. Using the URI parameter method is a useful way to execute RESTful
requests through a web browser. Additional URI parameters can be found in section 2.9 URI Parameters.
All API requests return a JSON object. The JSON response will always contain the members code and status.
The status member indicates a high-level result of the request and has two possible values: success and fail. The
code member is an HTTP response code describing the outcome of the API result. For a full list of response
code values, see section 3.2.2 Error Codes.
If an API call was successful, it may contain the member: result. This member contains data that was either
requested or data that was generated as part of the API request. If an API call was unsuccessful, the JSON
response will contain the member error. This member is a short description of the failure.
Example: Retrieving the current DHCP setting using the method URI parameter.
1
GET https://192.168.2.1/api/dhcp?method=GET
2
3
Status
:
HTTP /1.1 200 OK
4
5
" code "
:
200
,
6
" result "
:
7
" defaultGat eway "
" domain "
:
""
8
9
" enabled "
:
true
10
" fix edAddre sses "
11
12
" ip "
:
"19 2.168.2.15"
13
" mac "
:
"00
14
15
]
,
16
" leaseTime "
:
17
" leases "
:
[
18
19
" expiration "
20
" hostName "
" ip "
:
"192.168.2.103 "
21
Multi-Tech Systems, Inc. MultiConnect
rCell is a cellular router that uses a RESTful JSON API for managing configurations, polling
:
"192.168.2.1"
,
,
,
:
[
,
:
1 A
:
12
:
19
:
3 F
:
60"
86400
,
:
70359
,
:
" my - pc "
,
,
R
rCell API Developer Guide
5
Need help?
Do you have a question about the MultiConnect rCell MTR-H5 and is the answer not in the manual?
Questions and answers