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:
- Navigate to the swagger
page and click Security to expand the list of APIs and select
/api/security/login POST.
- 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.
- Click Try it Out!
- Swagger will do a POST and you will get a response in the Response
Body
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.
- At the top of the page is a banner
- In the text box that says api_key, enter the word bearer followed
by the access_token from the response body
- Press the enter key. This access token will be used on all
subsequent calls to the REST server.