Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Postman is a free Chrome extension that is designed to assist in making web service calls.  It's an excellent tool for testing your backend API, either directly or through the API Manager.

...

  1. Register your Application (Do only once, Optional) 
    1. If you haven't already, register your application by going to the "My Applications" tab of the api store.  Alternatively you can use the "DefaultApplication" that was made for your account.
    2. See steps 1 through 6 of WSO2's documentation on registering an application and subscribing for more info.
  2. Subscribe your Application to the API (Do only once per application & API)
    1. Go to the store, find the API, select your Application from the drop down box and press subscribe.
  3. Get a Access Token by authenticating (Do once per session, tokens are good for an hour)
    1. One way to get a token is to go to the "My Subscriptions" tab of the API Store, selecting your Application and pressing "Re-Generate".  A fresh token will be made and shown in the "Access Token" section of the page.
    2. The alternative way is to invoke a web service on the API Manager.  The Getting an Access Token section of this page covers how to do with with Postman.
  4. Invoke the webservice on the API Manager
    1. The token retrieved in Step 3 will be included as a head on the web service request.

...

  • Make the request a POST.
  • The URL of the API Manager's token web service: https://api-qa.ucsd.edu:8243/token
  • Add a header with the encoded Client Key and Secret
    • name: "Authorization"
    • value: "Basic <<encoded Client Key and Secret from above>>" for example "Basic YV9zSDBCdzEya2NuZkZFSmpKZkNmeW55TGdrYTowQXhmeGVVdDc4SksyMl9Yd3lDOFBOSDR5OUlh"
  • Set the Body to be "x-www-form-urlencoded"
  • Add a body key/value saying we are doing Client Credentials grant type
    • name: grant_type
    • value: client_credentials
  • Press Send

...