Using Api That Requires Basic Authentication; Procedure - JVC VN-E4U - 4 Channel Network Encoder Api Manual

4ch network encoder
Hide thumbs Also See for VN-E4U - 4 Channel Network Encoder:
Table of Contents

Advertisement

4. Using API that Requires Basic Authentication _

Basic authentication is required for APIs which are explained in Section 5. This section provides basic explanation of the uses of APIs that
require basic authentication.

4.1. Procedure

1) The client establishes a TCP connection to port number 80.
2) The client sends out API via TCP.
Example
3) VN-E4 returns a response to the client. In the following example, current subnet mask is 255.0.0.0. In addition, 255.0.0.0 is followed by &
and 200 OK, indicating that acquisition is successful.
Example
4) The client can disconnect TCP80 to end the use of API.
4. Using API that Requires Basic Authentication
Character strings of the following structure will be sent out.
GET
Space
Accept
Space
Host:
Space
Authorization: Basic
The following is an example of API for acquiring the subnet mask of VN-E4.
GET /api/param?network.interface.subnetmask HTTP/1.1<CRLF>
Accept: text/palin<CRLF>
Host: 10.0.0.1<CRLF>
Authorization: Basic YWRtaW46dm4tZTQ=<CRLF><CRLF>
Specify the response format by Accept line. A plain text response is returned when this is specified as text/
plain. An HTML response will be returned when text/html is specified. An HTML response will be returned
when Accept is not specified.
Restrictions are imposed on clients via basic authentication in the case of API for acquiring/setting parameters
of VN-E4. During basic authentication, user name and password shall be provided in the Authorization line.
There are 3 types of user names, namely admin, operator and user. The type of user for which use is allowed is
predetermined for each API. Join the user name and the password using a colon, Base64 encode this character
string and enter this in the Authorization line.
For example, when
User name: admin
Password: vn-e4
then the character string upon joining the user name and the password with a colon will be admin:vn-e4.
Base64 encoding this string yields YWRtaW46dm4tZTQ=. Enter this in the Authorization line. Default
passwords in the factory settings are as follows:
User Name
admin
operator
user
HTTP/1.1 200 OK<CRLF>
Connection: Keep-Alive<CRLF>
Content-Length: 80<CRLF>
content-type: text/plain<CRLF>
date: Fri, 13 MAY 2005 07:33:12 GMT<CRLF>
server: VN-E4 API Server/1.0.0<CRLF>
keep-alive: timeout=5, max=5<CRLF><CRLF>
network.interface.subnetmask=255.0.0.0&200 OK<CRLF>
Note also that each of the content-type, date, server and keep-alive lines begin with a lower-case character.
API Character String
text/plain or text/html
IP Address of VN-E4
Space
User Name and Password
Default Password
vn-e4
vn-e4
vn-e4
4.1. Procedure
Space
HTTP/1.1
0x0D 0x0A
0x0D 0x0A
0x0D 0x0A 0x0D 0x0A
0x0D 0x0A
16

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vn-e4

Table of Contents