![Axis 2N Indoor Touch 2.0 Скачать руководство пользователя страница 7](http://html1.mh-extra.com/html/axis/2n-indoor-touch-2-0/2n-indoor-touch-2-0_api-manual_3038317007.webp)
2N TELEKOMUNIKACE a.s., www.2n.cz
7/94
If the data to be transferred is rather extensive, store the data in the JSON format in
the HTTP request body (Content-Type: application/json; charset=UTF-8).
Refer to the list of command parameters for these exceptions.
The HTTP method GET is used for the requests that do not transmit data. The PUT
method is used for the requests that include data.
2.1.3 Responses to Requests
A response to a request always includes JSON data in the following format:
{
"data"
: {
"success"
:
true
,
"array"
: [
{
"serial_number"
:
"54-0562-0293"
}
]
}
}
Make sure that the cover-all
container and the nested boolean
are always
data
success
included. Success is always true if the command has been (or is expected to have
been) executed successfully. Nevertheless, it cannot be guaranteed for the time being
that the success=true value really means success for all commands. For example, there
may be no information on successful execution of the commands that
2N IP Mobile
®
resends to the 2N IP intercoms and so the value cannot be reported. Such commands
include the PUT method and the commands that do not return values: calls, opening
doors, etc. Thus, the user has to use another request (call/status, e.g.) to know the
command's success.
The false value is returned for many reasons. At present, the HTTP API cannot
distinguish errors and specific error messages will be implemented in the next versions
if necessary. The short list of potential errors is as follows:
Request entering error – invalid argument values, missing arguments, non-
existent subsystem, wrong JSON data format, incorrect HTTP method, etc.
A
command is entered but the application is not running.
2N IP Mobile
®
Therefore, make sure that the application has been started before sending a 2N
®
command.
IP Mobile
The
container can include more items whose names and contents depend on the
data
request to be sent. Our example includes an array of serial numbers.
Содержание 2N Indoor Touch 2.0
Страница 1: ...www 2n cz 2N Indoor Touch 2 0 API guide Firmware 4 2 2 Version 4 2 2...
Страница 15: ...2N TELEKOMUNIKACE a s www 2n cz 15 94 value 1 id 6 name Relay1 value 0 id 7 name Relay2 value 0...
Страница 32: ...2N TELEKOMUNIKACE a s www 2n cz 32 94 Response data data alarmsVolume 0 musicVolume 13 ringtoneVolume 14...
Страница 75: ...2N TELEKOMUNIKACE a s www 2n cz 75 94 Request data data newPassword NewPass123 oldPassword 2n...