[MUSIC PLAYING]
DINO CHIESA: Dino here.
I'm with Apigee, which is part of Google Cloud.
This video is Apigee 101.
We'll learn how to create a proxy
and begin serving traffic.
Let's dive in.
After you've created your trial account, sign in to apigee.com.
Click the API proxies icon and you'll see the proxies list.
Now, in your organization, you may
see one or more API proxies.
What we want to do is create a new one.
We'll do that with the wizard.
From within the wizard, first select reverse proxy.
We'll name the proxy, specify a base path--
I'll say more about that in a moment--
and specify the backend target.
This is what the proxy will connect to.
For this demonstration, we'll use a public API
that returns a JSON payload.
Then we specify our security requirements.
For now, we will have no security.
Specify the virtual hosts on which
this proxy will be active.
I prefer the TLS-enabled v host.
Specify the environment, test for now.
Done.
This proxy is now active, ready to handle traffic.
Let's click through to the proxy editor
to see the overview of the proxy we just created.
We can see all the details we provided.
Also, we can see the URL where we can invoke this API proxy.
Let's try it.
Just click this URL and it opens in another browser tab,
and we can see the JSON returned by the proxy,
so the proxy is working.
Let's flip back to the Apigee administrative UI.
Clicking the Develop tab gives us
the chance to modify the proxy produced by the wizard.
I can change the deployment status of the proxy,
undeploy it, at which point it won't be listening anymore.
I can change any of the choices I made previously.
And I can configure additional policies that
will run for each inbound request
before the request is proxied to the target,
or policies that run on the response after the response is
received from the target but before it
is sent to the original client.
Apigee proxies are smart and configurable.
Let's add a rate-limiting policy to this proxy, a quota
enforcement.
To do that, I'll click the preflow in the proxy endpoint
and click the plus step icon.
Here I see a list of the various policies
Apigee Edge has available.
I want the quota policy.
Let's configure it with a fixed rate limit of three requests
for every minute.
To do that, I'll just paste in some simple configuration.
Then I'll save it and redeploy it.
And then, flipping back to the other browser tab,
I can invoke it again.
Now, there's no change in the behavior of this API proxy.
It's still returning JSON.
But after I invoke that proxy more than three times,
I get an error that says the rate limit has been exceeded.
The Apigee proxy is rejecting the request
because it's exceeding the limit.
Rate limiting is easy.
Flipping back to the Apigee administrative UI,
in the Develop tab, let me raise that limit to, oh, 1,000
requests per minute.
I can do it just like that.
But surely there are other options for the quota policy.
How do I learn about them?
By selecting the policy in the API proxy editor,
I can get a hyperlink that takes me
to the documentation for that policy.
Here I can learn everything I need
to know about how to use the quota policy, super helpful.
If you have questions that are not
answered by the documentation, you can visit the community.
Find the link to the community in the Apigee
administrative UI.
Search there or ask a new question.
Friendly Apigee experts like me are always there,
willing to help you out.
In this video, you learned the basics
of Apigee Edge, how to create an API proxy
and how to add a policy to a proxy, how
to find documentation on a policy
and how to navigate to the Apigee community.
In the next video, we'll cover how to add API key verification
to an existing proxy.
Until then, I wish you strong API mojo.
[MUSIC PLAYING]