laatzen/LaaProductionWeb/LaaProduction.Web/API
2023-08-08 11:11:16 +02:00
..
Personalization PUNE protokol changes 2023-08-08 11:11:16 +02:00
Production PUNE protokol changes 2023-08-08 11:11:16 +02:00
Search parse software functions to string then to enum 2023-06-22 16:36:35 +02:00
APIExtensions.cs Authentication and Personalization for web and desktop. Active directory and local 2023-06-27 10:47:39 +02:00
LoginController.cs PUNE protokol changes 2023-08-08 11:11:16 +02:00
README.md Update README.md 2023-06-27 10:39:01 +00:00

Laa Production API

  1. Base address - http://sla12iis01.emea.sensus.net

  2. Authentication & Authorization - each user has his own set of roles and allowed functions to access within his employee account's. Authentication succeeds over username, password and software name.

    1. POST: /LaaProductionWeb/API/Login/Local - in order to authenticate particular user and obtain an authorization token. Use following parameters in the request body in json format:

      • Username - required string. Should match a username saved in the database.
      • Password - required hash string. Should match the password hash for the above entered username.
      • Assembly - required string. As Assembly name, use the assembly name that calls this API.
      • MajorV - optional int - default 0. As MajorV, use the major version from the assembly name that calls this API.
      • MinorV - optional int - default 0. As MinorV, use the minor version from the assembly name that calls this API.
      • BuildV - optional int - default 0. As BuildV, use the build version from the assembly name that calls this API.
      • if authentication succeeds you will receive in response a string {token} that should be used for further authorization otherwise error message is received.
    2. POST: /LaaProductionWeb/API/Login/AD - in order to authenticate particular user and obtain an authorization token. Use following parameters in the request body in json format:

      • EmployeeId - required int default - 0. The actual employeeid attribute from the AD.
      • FirstName - required string. The actual givenname attribute from the AD.
      • LastName - required string. The actual sn attribute from the AD.
      • Username - required string. The actual samaccountname attribute from the AD.
      • Phone - required string. The actual telephonenumber attribute from the AD.
      • Email - required string. The actual mail attribute from the AD.
      • Assembly - required string. As Assembly name, use the assembly name that calls this API.
      • MajorV - optional int - default 0. As MajorV, use the major version from the assembly name that calls this API.
      • MinorV - optional int - default 0. As MinorV, use the minor version from the assembly name that calls this API.
      • BuildV - optional int - default 0. As BuildV, use the build version from the assembly name that calls this API.
      • if authentication succeeds you will receive in response a string {token} that should be used for further authorization otherwise error message is received.
    3. Authorization: Bearer {token} - is the scheme to use within the authorization and further API calls on all other routes.

  3. Personalization - personalization section handels users, softwares and their roles and functions.

    1. GET: /LaaProductionWeb/API/Software/Access - endpoint for retrieving software functions.
  4. Wildcard search:

    1. GET: /LaaProductionWeb/api/search/wildcard - returns a list of possible fields to return when searching. Default are all fields returned to the client.

    2. POST: /LaaProductionWeb/api/search/wildcard - returns a list of found results. Within the searching you should use following parameters in the request body in json format:

      • Token - search string. Requires from 3 up to 50 - letters, digits and or (" ", "-") charachters.
      • Fields - optional. List of fields to return.