Muxlab Multimedia 16 x 16 Matrix Switch User Manual
Page 56

© MuxLab Inc.
Multimedia 16x16 Matrix Switch Installation Guide
Page 56
4. Basic Authentication
Authentication is performed in two simple steps:
1. Obtain a Session ID
Perform a GET request on /var/session.json to obtain a new session ID. The return value
will be a JSON array of a single integer, for example [12345]. From then on, simply
append the session to any new IP requests to use this session, e.g., GET
/var/conn.json?sid=12345
2. Obtain Credentials for that Session ID
There are three permission levels that can be used to read/modify properties. These are:
0 – Guest: Can read all values. Cannot write or make changes.
1 – User:
Same as Guest, but can change matrix video connections.
2 – Admin: Can perform any command without restriction.
To obtain credentials, you will need to POST an array of two strings to /var/auth.json: the
userlevel, and the password associated to that user. For example:
POST
/var/auth.json?sid=12345
POST data: [“2”, “mypassword”]
If successful, you will receive an HTTP 201 Created response.
Sessions will automatically close after 5 minutes of inactivity. They may also be
closed at any time by a GET /var/logout.json.