How to Develop API's with Google Cloud Apigee API Platform | An Overview

api apigee cloud development Jan 19, 2021

Apigee The Cross-Cloud API Management Platform

The old technologies can no longer hold up with the need of today’s modern world. Today we can book hotels, flights, call an Uber, and much more using integrated web services.

Before the change on the user end comes the change on the developer end. To make things simple today, developers might use a multi-cloud world for connected services between customers, partners, and developers.

Using an API is a smart way to do that; it makes everything more scalable, affordable, and easy to manage.

However, you might not be able to handle the amount of data, and you may not secure it properly.

You might not be able to conduct analysis often. You may not be able to handle the traffic if it exceeds the limit time.

Here the Google Cloud Apigee service comes in;

What is the Google cloud Apigee platform? It is a cloud service Apigee platform for managing your APIs.

Apigee is located here.

It will secure your data, manage, scale, and analyze your data automatically on its cloud servers. It also allows you to connect easily with external partnered services so you may grow your business.

Provided Apigee Products

There are currently two Apigee products provided named Apigee and Apigee hybrid.

Apigee is a complete service that manages, analyzes and deploys our APIs, while Apigee hybrid also manages and scales your data, but here you can choose the runtime through a different cloud provider.

Google is just responsible for the management part. The REST services, like API data and traffic, are managed by your side.


Steps to use Apigee

  • First, you use Apigee services by google to create and deploy our Apigee services.
  • Next, they pass through a secure Kubernetes cluster (Apigee runtime) managed by Google, where our data is monitored and analyzed on deploying our services. This analysis provides us with errors and even future errors that might occur based on past analytics.
    • Both first two points are connected to GCP services, making the management more simple through a portal. It provides additional features such as;
      • Control of security features, like Identity management.
      • The analytics returned from runtime can be viewed here.
      • Other monitoring and management feature which makes things simple.
  • After passing through runtime, comes our consumers who use our services on the back end and provide data back to Apigee runtime.

This was a straightforward architecture of Google’s cloud Apigee; let’s now discuss a more thorough installation and usage overview.

How to Develop API with Google cloud Apigee API platform?

(Basic Installation)

Before getting started

Before getting started, you need to have Google cloud services working ,i.e., you have to pay for that. If you are working with trial bases, then it will expire after 60 days.

Now that you have Google cloud with billing active, you will need to create a cloud project. Note the name and ID of the project you create. You will also need Google SDK installed.

Before we move on, you will also use the Apigee provisioning wizard by Google to help you set up.

Note: For complete step by step installation, visit Google’s Documentation

1.      Defining Variables

The first to do is define the environmental variables that you are going to use later.

  • First, to define variables, log in to your cloud using the command  gcloud auth login; this will take you to the browser to select your account.
  •  Next, initialize Google Cloud SDK.
  • Lastly, open the terminal again and define your environmental variables, which would be Auth (authentication token which will be used to send the requests to API proxy using HTTP), location, region, and project number.

An example of a defining variable would be AUTH= “Authorization: Bearer $(gcloud auth print-access-token),” the rest are also defined like this.

2.      Enabling more APIs

By default, most APIs and not enabled. You can enable APIs by logging into your cloud, then in terminal type gcloud services enable “name of the service.” An example of a service might be; this is called a compute service, which may not work if you are using the trial; it is responsible for managing runtime.

To see which services are active, type gcloud services list. You can enable multiple benefits as per requirement.

3.      Creating an organization

To create an organization, open Apigee provisioning wizard, enter a suitable name of your project, next click gets started, you will have some task in front of you, from here select apigee organization, then, select a physical location and finally configure the encryption keys by the following method;

Create an encryption key by using gcloud kms keys create command. Enter the key path now in the second field, and you are good to go. It will take some minutes to process.

Cloud Developers are in high demand! Consider a Certification!

4.      Setting up networking

Now you need to establish a connection between your device and cloud services.

If you are using a virtual private cloud, then you need to connect that services to Google. You can do that now by establishing a peering connection between the two.

Open Apigee provisioning wizard and continue setting up from the second step, which is networking. You need to be the main administrator here other-wise, you will need the administrator device to establish a VPC connection through peering.

If you are authorized, then select your project, and then you can carry on with the default settings. Next, you can let the wizard decide the IP range automatically or do so manually.

5.      Creating runtime

As discussed earlier, apigee runtime is the bridge between the users and us. The concept is similar to clusters in Kubernetes; in fact, more runtime instances are called clusters.

Open the provisioning wizard and continue from the third step, which is setting up the runtime. You will be asked for a location; here, select the one that you declared at the start.

Create an encryption key as you did before and add the path in the next field. Click create runtime; this will take time.

6.      Configuring Environment

You can set up an environment or group environment. Anyhow in order to do that, open the wizard, and continue your steps. Edit the names of the environment and group environment; environment names could be any name, while group one Is a hostname(the one with .com) that will direct to this group. Next, create the environment. You can use environments again later. Be sure to assign a hostname every time you make an environment.

7.      Re-routing

You configure your routing to internal or external whether it will receive requests externally or just between the private network.

  • How to provide external requests?

Open the wizard and continue the task. Select enable internet access option, change the name of default virtual machine if you want to, next add relevant certificate’s again optional based upon your app, finally click set access and you have now external connection.

  • How to keep the request within VPC?

Open the wizard and this time select no internet option.  Note down the IP and click continue; you are done here.

8.      Testing

Deploying a sample proxy would be different based on which route you used in the previous internal or external step. First of all, configure your DNS; it is optional, but if you don’t, then you have to access your application through IP-addresses instead of URL.

If you provided external requests

Open the wizard and continue from “deploy API.” This will deploy a proxy named hello world. This will take some time, depending upon how many clusters you have. You can test the proxy after a few minutes by visiting it in your terminal by adding the curl command along with your hostname.

If you provided internal requests

To access a proxy from a private network, you first need to create a private network. You can do that by using the gcloud command. Install curl on the new virtual machine.  Test the server by the following commands.

curl -i -H “Content-Type: application/json”   -H “Host: hostname”   https:// ip adress/helloworld

In both cases, if your server is running, it will return a series of commands with hello world at the end.


The procedure will not be this simple because you won’t always be deploying hello world, so there are various online courses to learn about how to develop and deploy APIs with Google Apigee so check them out.

Deploying is different when you do it with the command line or when you are working with a hybrid apigee as you have to peer connections between two platforms.

You can do the whole procedure discussed above with commands only; this will reduce the chance of errors, but it is more complicated. So it is advised to use the wizard for the whole procedure.

The whole procedure can have a lot of errors, and you might need to troubleshoot a couple of times, so you have to be patient.

Keep in Touch and follow to get latest updates.

Joseph Holbrook, CLO

About TechCommanders

We are TechCommanders… experts in Next Generation Technology Training.
TechCommanders is an online training platform for both aspiring and veteran IT professionals interested in next generation IT Skills.
TechCommanders is led by Joseph Holbrook, a highly sought-after technology industry veteran.

Techcommanders offers blended learning which allows the students to learn on demand but with live training. 

Courses offered are used to prepare students to take certification exams in Cloud, DevOps, IT Security and Blockchain.

Techcommanders was established in Jacksonville, Florida in 2020 by Joseph Holbrook, both a US Navy Veteran and a technology industry veteran. Techcommanders, Advancing your NextGen Technology Skills.


Join TechCommanders Today. 

Over 60 Courses and Practice Questions! 

Coaching and CloudINterviewACE

Join TechCommanders

Stay connected with news and updates!

Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.

We hate SPAM. We will never sell your information, for any reason.