Testing your API

I prefer to use Postman for testing APIs (www.postman.com). Postman is free if you want to use it for testing APIs.

Step 1 - Create a collection

Open Postman

  1. Press the button New Collection
  2. Give your collection a new name e.g. Board API
  3. Select the option Authorisation

Step 2 - Authorization

  1. Select the tab authorization
  2. Select OAuth 2.0 as your authorization type.
  3. Expand the selection Configure New Token.
  4. Enter your Access Token URL, which is always like this

    https://<BOARD SERVER>/identity/connect/token

  5. Enter your Client ID (this is the API user name)
  6. Enter your Client Secret
  7. Set the scope: public-api

Scroll a bit down and press the button Get New Access Token

Postman will call your API and when everything is entered correctly it will show a new screen with an unique token.

Press the button Use Token, you will return to the previous screen and now press update.

You now created a new collection and you can add now an API to test if your API is working.

  1. Select your collection
  2. press the plus icon to add a new tab.
  3. Select the option GET.
  4. Copy the URL, which you have created in the step configure an API Query into the address bar.
  5. Press the save button to add your request, you will need to save it in your Collection before you can use it, the requests needs the token from the collection

Make sure that you select the collection before pressing the save button

After you have saved your request you can execute it.

  1. press the send button
  2. In the bottom of your screen you will see the data in JSON format.