27.1 Web Service
WebAccess Web Service provides two formats: XML and JSON
XML:No word before URL. For example,
http://localhost/WaWebService/Login
JSON:Add JSON in front of URL. For example,
http://localhost/WaWebService/JSON/Login
Request Headers:
1. XML:Content-Type: application/xml; charset=utf-8; LoginType=view;
Authorization: Basic YWRtaW46YWRtaW4=
2. JSON:Content-Type: application/json; charset=utf-8; LoginType=view;
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type : XML: application/xml, JSON: application/json
Charset : Using charset=utf-8 for the two formats
LoginType : WebAccess has two kinds of users: project manager and general user, you can use LoginType to specify which user to log in, Config: project manager, View: general user.
Authentication
For using Basic Authentication, Username and Password need use Basic64 encryption into Request Header
For example:
User Name : admin
Password : admin
Encrypt admin:admin by Basic64 get YWRtaW46YWRtaW4=
Add the line in Request header
Authorization: Basic YWRtaW46YWRtaW4=