The remote configuration API (Application Programming Interface) http://192.168.1.2/admin/remoteconfig
provides the methods used for remotely changing configuration parameters directly on the MOBOTIX camera.
The camera's HTTP interface processes commands and configuration parameters in an HTTP POST request as in the following example:
POST /admin/remoteconfig HTTP/1.0
Content-type: application/x-www-form-urlencoded
Authorization: Basic YWRtaW46bWVpbnNt
Content-length: 87
helo
view section audio
write params
audio/MICRO=1
view section audio
store
update
quit
Part | Description |
---|---|
POST /admin/remoteconfig HTTP/1.0 |
Header of the HTTP POST Request. |
Empty line; separates the request's header from its content. | |
helo |
Beginning of the command sequence. |
view section audio
|
Command sequence with specific commands, as described in the Commands of the Remote Configuration API section. |
quit |
End of the command sequence. Attention: A concluding space and line break are always required. |
Remarks:
Content-type: application/x-www-form-urlencoded
) does not need to be specified, but it is expected by the camera's web server.Basic
authentication is used). User name and password are concatenated by a colon (":") and Base64-encoded. See the line above for the "admin:meinsm
" user name and password.Content-length
) is the length of all data that follows the blank line after the header.This example is discussed in detail in Output of the Remote Configuration API using the cURL
command line application.
You can use the commands as shown in the following syntax samples:
<command>
<command> <keyword>
.<command> <parameter1> <parameter2>
.<command> <keyword> <parameter1> <parameter2>
.The Remote Configuration API provides the following commands:
Command | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
reset |
Resets the entire camera configuration or individual sections thereof to the factory default values.
|
||||||||
restore |
Restores the configuration from the copy in Flash storage.
|
||||||||
delete |
Deletes the entire configuration, specific sections or individual parameters.
|
||||||||
write |
Deletes entire sections or - when used with the params keyword in front, individual parameters of the configuration.
|
||||||||
append |
Appends data to configuration sections. The parameters to append to a section are specified line by line between SECTION and ENDSECTION as in the following:
SECTION <section name> |
||||||||
view |
Returns (shows) the entire configuration or specific sections.
|
||||||||
store |
Permanently stores the configuration in the camera's Flash memory. | ||||||||
reboot |
Reboots the camera. | ||||||||
update |
Applies all changes to the configuration that can be activated without rebooting the camera.
|
||||||||
profile |
Returns one line with the name of the current configuration profile. This line is empty, if no profile is active. | ||||||||
activate_profile |
Activates the configuration profile specified as parameter:
activate_profile <profile name> |
||||||||
reboot_needed |
Returns all changed configuration sections, which require a reboot before they can be applied. This line is empty, if no change requires a reboot.
Note: After changing the entire configuration (using |
||||||||
exit |
Identical meaning. Both commands end the preceding command and close the API command sequence. Note that you can only use one of these two commands in a command sequence. | ||||||||
help |
Returns a list of available commands (see Returning a List of Commands Using help ). |
The camera API returns its answers line by line:
#
" and documents the progress while processing the commands.ERROR:
", followed by a description of the error that occurred.reset
, store
, etc.) do not have any output.OK
" before closing.This example demonstrates how to activate the microphone using an HTTP request. For easily testing the remote configuration API, the cURL
command line tool (http://curl.haxx.se/download.html) can be downloaded for Windows. It is automatically installed on Mac OS X and most Linux computers.
Using cURL
allows quickly and easily testing the commands, since this tool handles the communication with the camera. For example, cURL
automatically sends the correct header and calculates the length of the command sequence.
Request to be sent:
Commands | Description |
helo |
# Beginning of the command sequence. |
Step-by-step instruction:
<user name>
, <password>
and <IP address>
by the actual data of your camera:
curl -q -v -u "<user name>:<password>" --data-binary @- "http://<IP address>/admin/remoteconfig"
cURL
is now waiting for commands.helo
to quit
.Output of the command sequence with the following data:
* About to connect() to 10.8.0.118 port 80 (#0)
* Trying 10.8.0.118... connected
* Connected to 10.8.0.118 port 80 (#0)
* Server auth using Basic with user 'admin'
> POST /admin/remoteconfig HTTP/1.1
> Authorization: Basic YWRtaW46bWVpbnNt
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18
> Host: 10.8.0.118
> Accept: */*
> Content-Length: 87
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: text/plain; charset=utf-8
< Cache-Control: no-cache
<
#read:helo:
#read:view section audio:
#exec cmd=view section audio
SECTION audio
SPEAKER=1
MICRO=0
PREAMPLIFIER=2
SPEAKERLEVEL=0
ENDSECTION audio
#read:write params:
#exec cmd=write params
#read:view section audio:
#exec cmd=view section audio
SECTION audio
SPEAKER=1
MICRO=1
PREAMPLIFIER=2
SPEAKERLEVEL=0
ENDSECTION audio
#read:store:
#exec cmd=store
#Storing to flash...
#read:update:
#exec cmd=update
#updating daemons!
#read:quit:
OK
#bye
* Closing connection #0
Note: Output beginning with a "*
", "<
" or ">
" character is generated by cURL
. In the output, ">
" precedes the commands sent to the camera, while "<
" precedes the messages returned by the camera's web server. The remaining lines are returned by the remote configuration API, as described in the Output of the Remote Configuration API section.
help
Request to be sent:
Commands | Description |
helo |
# Beginning of the command sequence. |
Step-by-step instruction:
<user name>
, <password>
and <IP address>
by the actual data of your camera:
curl -q -v -u "<user name>:<password>" --data-binary @- "http://<IP address>/admin/remoteconfig"
cURL
is now waiting for commands.helo
to quit
.Output of the command sequence with the following data:
* About to connect() to 10.8.0.118 port 80 (#0)
* Trying 10.8.0.118... connected
* Connected to 10.8.0.118 port 80 (#0)
* Server auth using Basic with user 'admin'
> POST /admin/remoteconfig HTTP/1.1
> Authorization: Basic YWRtaW46bWVpbnNt
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18
> Host: 10.8.0.118
> Accept: */*
> Content-Length: 87
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: text/plain; charset=utf-8
< Cache-Control: no-cache
<
#read:helo:
#read:help:
The following commands are currently implemented:
append
reboot_needed
view
reboot
write
profile
restore
activate_profile
reset
update
delete
store
exit
quit
help
#read:quit:
OK
#bye
* Closing connection #0
Note: Output beginning with a "*
", "<
" or ">
" character is generated by cURL
. In the output, ">
" precedes the commands sent to the camera, while "<
" precedes the messages returned by the camera's web server. The remaining lines are returned by the remote configuration API, as described in the Output of the Remote Configuration API section.
cn, de, en, es, fr, it, jp, ru |