Setting up Test API using API Gateway | Scribe

    Setting up Test API using API Gateway

    • Hafeez Baig |
    • 33 steps |
    • 3 minutes
    information ordinal icon

    Refer to the following guide to learn how to use IAM in the cloud\ <https://scribehow.com/shared/Creating_an_IAM_User_and_User_Group_in_AWS_Management_Console__hWNiiXlcRJKFqYZZEJD-cg>

    1

    Sign in to **AWS Management Console** as an **IAM User** **Pre-requisite** - Ensure you have selected the AWS region closest to your location\ For this guide, we will be using us-east-2 (Ohio) as a preferred choice

    2

    Type **API Gateway** in the search bar and click on **API Gateway** to view the API Gateway Dashboard

    information ordinal icon

    **What is an API Gateway in AWS?** Amazon API Gateway is a fully managed service provided by AWS that allows developers to create, publish, maintain, monitor, and secure APIs at any scale. It acts as a front door for applications to access data, business logic, or functionality from back-end services, such as Lambda functions, HTTP endpoints, or other AWS services.

    3

    On the **API Gateway** dashboard, on the right side click on the **Create API** button

    4

    **Choose an API type** wizard will open , scroll to the **REST API** section and click on **Build** button

    information ordinal icon

    **What is REST API?** A REST API (or RESTful API) is an application programming interface (API) that follows the design principles of the Representational State Transfer (REST) architectural style. In simpler terms, it's a way for applications to communicate with each other using HTTP requests and responses.

    5

    **Create REST API** wizard will open, Under the **API details** section choose the **New API** option and give the API name as "**test-api"**

    6

    Click on the **Create API** button

    7

    REST API named **test-api** is successfully created

    8

    Scroll to the **Methods** section and click on **Create method** button

    9

    Create method wizard will open, Under **Method details** from the Method type dropdown select the **GET** option

    information ordinal icon

    **What is GET method ?** The GET method is an HTTP request method used to **retrieve data** from a server. It's like asking a question to get information.

    10

    Choose the **Integration type** as **Mock**

    information ordinal icon

    **What is the Mock integration Type?** A mock integration type is a method used in API Gateway, a service offered by Amazon Web Services (AWS), to simulate the behaviour of an external system during the development and testing stages of an API.

    11

    Scroll the page and click on the **Create method** button

    12

    Successfully created method '**GET**'

    information ordinal icon

    Congratulations on successfully creating the GET method in API Gateway! Well done!

    13

    Scroll the page and click on the **Test** tab, then click on the **Test** button

    14

    Scroll the page to view the test results