Using Swagger

Swagger supports a Try It Out feature that can be used to test the APIs.  To use the Try It Out feature for any of the APIs, you first need to log in.  Below is an example of how to log in using the Try It Out feature in swagger:

 

Swagger_Main_Page.bmp

  1. Navigate to the swagger page and click Security to expand the list of APIs and select /api/security/login POST.

    Swagger_POST_api_security_login.bmp
  2. In the Parameters section, click on the yellow Example Value box.  This will populate the loginInfo with correctly formatted input parameters.  For username, put in a valid Windows Active Directory user name.  Note that swagger requires an escape for the backslash character so if you enter the user name in the form of domain\user, you will need to enter it as domain\\user when using swagger.
  3. Click Try it Out!
  4. Swagger will do a POST and you will get a response in the Response Body
    SwaggerLoginResponseBody.bmp

    Copy the access token into your copy buffer.  You will need to select the entire string as it scrolls off the screen to the right.  Do not copy the double quotes.
  5. At the top of the page is a banner
    SwaggerHeaderEmpty.bmp
  6. In the text box that says api_key, enter the word bearer followed by the access_token from the response body
    SwaggerHeaderBearer.bmp
  7. Press the enter key.  This access token will be used on all subsequent calls to the REST server.