Using api that requires basic authentication, Restrictions, Procedure – JVC VN-V685U User Manual

Page 16

Advertising
background image

16

4.2. Restrictions

Maximum number of clients

The maximum number of clients that may acquire alarm is 10. When a 11th client establishes TCP connection to port

number 32040, VN-V685/686/686B disconnects the TCP connection.

Additionally, VN-V685/686/686B will also check whether the TCP connection is maintained at regular intervals.

VN-V685/686/686B will disconnect the TCP connection if syn exchange is not performed in 10 minutes.

Note: API for getting alarm is not restricted by the access restriction function.

5. Using API that Requires Basic Authentication

Basic authentication is required for APIs which are explained in Section 6. This section provides general explanation of

those APIs.

5.1. Procedure

1) The client establishes a TCP connection to port number 80.

2) The client sends API.

API has following structure.

The following is an example of API for Getting subnet mask of VN-V685/686/686B.

Example

GET /api/param?network.interface.subnetmask HTTP/1.1<CRLF>

Accept: text/plain<CRLF>

Host: 192.168.0.2<CRLF>

Authorization: Basic YWRtaW46anZj<CRLF><CRLF>

Specify the response format by Accept line. Plain text response is returned when this is specified as text/plain. HTML

response is returned when text/html is specified. HTML response is returned when Accept is not specified.

These APIs for getting/setting parameters are protected by basic authentication. Authorization line needs to include

Accept:

text/plain (or text/html)

space

space

HTTP/1.1

0x0D 0x0A

Host:

space

IP Address of VN-V685/686/686B

0x0D 0x0A

Authorization: Basic

space

Encoded

User Name and Password

0x0D 0x0A 0x0D 0x0A

GET

space

API Characters

0x0D 0x0A

Advertising
This manual is related to the following products: