Creating APIs to handle HTTP GET requests with Api-On-Cloud

The series of video tutorials below demonstrate how to create APIs to handle HTTP GET requests using the online API Editor

Tutorial 1a: Creating an API and calling it from the browser

In this video tutorial, we will be creating an HTTP GET API, save & publish it, and then call the API from the web browser. The API returns a list of 3 countries from the North American Continent.

API Request
Request Path: /continent/north-america
HTTP Method: GET
API Response
Response Code: 200
Response Content-Type: application/json
Response Body:


















[
  {
      "country": "Canada",
      "country-alpha2-code": "CA",
      "captial": "Ottawa",
      "continent": "North America",
      "continent-code": "NA"
  },
  {
      "country": "United States of America",
      "country-alpha2-code": "US",
      "captial": "Washington, D.C.",
      "continent": "North America",
      "continent-code": "NA"
  },
  {
     "country": "Mexico",
     "country-alpha2-code": "MX",
     "captial": "Mexico City",
     "continent": "North America",
     "continent-code": "NA"
  }
]

 Watch Tutorial 1a

Tutorial 1b: Creating an API and calling it via cURL

We will be creating an HTTP GET API in this video, save and publish it, and then later we will launch a Linux Terminal and use cURL to call the newly created API and view the response returned by the newly created API

API Request
Request Path: /continent/north-america
HTTP Method: GET
API Response
Response Code: 200
Response Content-Type: application/json
Response Body:


















[
  {
      "country": "Canada",
      "country-alpha2-code": "CA",
      "captial": "Ottawa",
      "continent": "North America",
      "continent-code": "NA"
  },
  {
      "country": "United States of America",
      "country-alpha2-code": "US",
      "captial": "Washington, D.C.",
      "continent": "North America",
      "continent-code": "NA"
  },
  {
     "country": "Mexico",
     "country-alpha2-code": "MX",
     "captial": "Mexico City",
     "continent": "North America",
     "continent-code": "NA"
  }
]

 Watch Tutorial 1b