Analyzing an Exported Apigee API Proxy

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Before deploying your API proxy to production, you need to make sure that it is thoroughly reviewed and tested. Static code analysis is an important procedure you can run that helps to ensure your code is consistent and clean. This process is known as _linting_, and Apigee API proxies can take advantage of an open-source tool called apigeelint. In this hands-on lab, we’ll take the preliminary steps necessary to run apigeelint, exporting our API proxy using the Apigee Edge Management APIs. Then, we’ll install apigeelint and use it to validate our code, displaying the results in a table format.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Export the API Proxy
  1. On the Apigee dashboard page, click API Proxies.
  2. Click the link for the proxy you want to analyze.
  3. Review the name and revision number.
  4. In your browser, navigate to https://apidocs.apigee.com/management/apis.
  5. In the Apigee Management APIs navigation menu, select API Proxies > Export API Proxy.
  6. Scroll down the page to the Resource URL section.
  7. Complete the Resource URL by filling in the following elements:
    • Your organization name
    • Your API proxy name
    • Your proxy’s revision number
  8. In the HTTP Basic box, click Set…
  9. In the Set Authentication dialog, enter your Apigee email and password.
  10. Click Save.
  11. Click Send this request.
  12. Select the cURL tab.
  13. Copy the generated cURL command to your clipboard.
  14. In your terminal, paste the copied cURL command, and add the following:
    -o ~/downloads/LAproxy.zip
Install and Run apigeelint
  1. Change to your Downloads directory.
    cd ~/downloads
  2. Verify that the LAproxy.zip file is in the Downloads directory.
    ls
  3. Install apigeelint.
    sudo npm install -g apigeelint
  4. Enter your password at the prompt.
  5. Unzip the downloaded proxy.
    unzip LAproxy.zip
  6. Run apigeelint on the proxy folder.
    apigeelint -s apiproxy/ -f table.js
  7. Review the results.

Additional Resources

Your API proxy is nearly ready for production, and it's time for you to double-check your work. You decide to use apigeelint to programmatically review your proxy code.

You’ll need to complete the following steps to accomplish your task:

  1. Export the API proxy.
  2. Install apigeelint.
  3. Run apigeelint on the exported API proxy.

Please note: There are several prerequisites for this hands-on lab:

  1. You must have an Apigee account.
  2. You must have completed the following hands-on labs: Creating an Apigee API Proxy and Testing an API Proxy.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!