Web API is a framework used to build HTTP service that reach a broad range of clients, including browser and mobile devices.
Following is the Base URL:
<Protocol>://<Domain Name>:<Port Number>/api/v1
If you are using display unit with SP5000 Series Open Box (Windows 10 IoT Enterprise Model) or IPC Series or PC/AT then you can use machine name also.
Enter the user name and password to get the token. When using Security, the token is used for authorization.
Token-based authentication is a security technique that authenticates the users who attempt to log in to a server, a network, or some other secure system, using a security token provided by the server.
| Item | Value | |||||||||
| Method | POST | |||||||||
| URL | <Base URL>/login | |||||||||
| Parameters | N/A | |||||||||
| Header | Content-Type, Content-Length
|
|||||||||
| Body | JSON
|
|||||||||
| Example | POST http://192.168.1.100:8000/api/v1/login HTTP/1.1 Host: localhost:8082 Content-Type: application/json content-length: 44 { "username":"User1", "password":"Pass1" } The example code is written in Java. |
| Item | Value | ||||||
| Status Code | Success to authenticate,
display unit will send 200 (OK).
|
||||||
| Header | Content-Type, Transfer-Encoding
|
||||||
| Body | JSON
|
||||||
| Example | HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked
8e { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlVzZXIxIiwibGV2ZWwiOjF9.eqVwAuo0KMqdggICllJVPs3IE67oHdUpo04w68md7kI" } 0The example code is written in Java. |