Part of Two of the API Development on API Connect Series. In this part we will show how to specify parameters for an API call. This builds on from the artefact and knowledge created in part 1.

  1. Go to the API that was created in part 1.

  2. Go to the Design View

  3. Click on Paths

  4. Click on /

  5. Click on GET

  6. Fill in the parameters
    Summary - Operations Returns the account balance for a given Account ID
    Tags - balance
    Description - To consume this API you must pass on the account id

  7. Click on Add Parameters

  8. Fill in the parameters Name - uid Located In - query Type - String Description - The Account ID to be queried

  9. Press Save

  10. Click on Properties

  11. Click on the Hot Dog Menu next to target url and select edit

  12. The query parameter must be removed and replaced with the variable we defined in the parameter in step 7. Change default value to http://apic-test-app.eu-gb.mybluemix.net/api/balance?id={uid}

  13. Press Save

  14. Republish and test the API as we detailed in part 1.. If you are using the API Designer ensure you add the paremeter ?uid=1001 or ?uid=1002 at the end of the url you are invoking. If you are using the API Manager you will need specify the parameter in the test form.