Skip to content

API GET request

sanfordwinslow edited this page Feb 12, 2020 · 4 revisions

https://github.com/North-Seattle-College/ad440-winter2020-tuesday-repo/issues/61

  1. In VSCode login in to azure functions with az login. If azure functions are not installed follow the documentation at: https://docs.microsoft.com/en-us/azure/python/tutorial-vs-code-serverless-python-01

  2. Create a GET request with paramaters. req.params.get()

  3. Deploy to azure with: func azure functionapp publish < functionappname >

  4. Copy url address provided once deployment is finished

To Test:

  1. Download and open Postman

  2. Paste url address from deployment in the url address. Make sure GET is chosen as method. https://san-zg-fun-usw2-task61.azurewebsites.net/api/getRequest?code=JO0TadDNhDyK85lG67XQhaI5pOcMXM8/9oAweLCdrYFfr096WyuR6w==

  3. Under Params in menu bar: type machine in key area type a name in value type machineId in key area type a number in value

  4. Make sure code, machine, and machineId are all checked

  5. In Body enter an empty JSON file such as: {}

  6. Click Send

  7. In Response area you will see a validation code and output

  8. Login to North Seattle College Microsoft Azure portal and click Resource Group

  9. Click on san-zg-feat-usw2-task61

  10. Click on san-zg-fun-usw2-task61

  11. Click on Monitor in left pane to see the logs

Clone this wiki locally