Default language.

Authenticating users with Web Services APIs


Before you can use the Track It Web Services APIs, you must authenticate your username.  You can authenticate usernames through either of the following methods:

Warning

Note

You can only use Technician Track-It! credentials to authenticate.

Using the Swagger interface to authenticate users

  1. Navigate to http(s)://servernameOrIP/trackitvirtualdirectory/WebAPI in the browser.
    This loads the Swagger interface, which provides a list of all available Web APIs and their input parameters. You can use the Swagger interface to test each Web API.
  2. Select the Web API you want to execute and when prompted to authenticate, enter the following authorization credentials:
    • For Username, enter GROUP\LOGINID
    • For Password, enter your password

      Warning

      Note

      Group and Login ID are both case-sensitive and need to be entered in all capital letters.

  3. Click Authorize.

Creating a Token Web API to authenticate users

The following table describes the Token Web API:

Description

Returns the Authorization Bearer access_token that authorizes the use of all Track-It! Web Services APIs

Type of call

POST

Request Authorization Header

None

URL Syntax

http(s)://servernameOrIP/trackitvirtualdirectory/WebApi/token

Request Parameters

None

Request Body

scope:

grant_type: password

username: <GROUP\LOGINID>

password: <password>

Execution response

The following values are returned:

  • Authorization Bearer token
  • Bearer as token type
  • Date and time of issue
  • Expiration date and time of the token
  • Expiration duration of the token in seconds
  • Server language
  • Technician information as follows:
    • username
    • usergroupname
    • First Name
    • Last Name
    • Phone
    • Extension
    • EMail Address
    • Alternate Phone, 
  • Priority hierarchy of the specific group

Important considerations

The access_token is used in all subsequent API requests for authorization and maintaining the session of a technician.

Information
Example

http(s)://servernameOrIP/trackitvirtualdirectory/WebApi/token

Request Body:

scope:

grant_type: password

username: SYSTEM ADMINISTRATION\ADMINISTRATOR

password: trackit

Response: 

{

"access_token":"ExPqpLF79Zi+vHZJIXZOGBSQVPKXlFVOfmQzMyfS7SGYJolrDAf3/LZR1qm9X+2OVY60OlEuUYOYaflcIjj7ytZ336b50mu4ieuPnx2AU2vCFgO3eqUe22Up",

"token_type":"bearer",

"expires_in":17999,

"refresh_token":"3c53ff0dc6f44b3a9071e861b8ef2022"....

}



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

Track-It! 2019