- Lab
- A Cloud Guru
Analyzing an Exported Apigee API Proxy
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.
Path Info
Table of Contents
-
Challenge
Export the API Proxy
- On the Apigee dashboard page, click API Proxies.
- Click the link for the proxy you want to analyze.
- Review the name and revision number.
- In your browser, navigate to https://apidocs.apigee.com/management/apis.
- In the Apigee Management APIs navigation menu, select API Proxies > Export API Proxy.
- Scroll down the page to the Resource URL section.
- Complete the Resource URL by filling in the following elements:
- Your organization name
- Your API proxy name
- Your proxy's revision number
- In the HTTP Basic box, click Set...
- In the Set Authentication dialog, enter your Apigee email and password.
- Click Save.
- Click Send this request.
- Select the cURL tab.
- Copy the generated cURL command to your clipboard.
- In your terminal, paste the copied cURL command, and add the following: -o ~/downloads/LAproxy.zip
-
Challenge
Install and Run apigeelint
- Change to your
Downloads
directory. cd ~/downloads - Verify that the
LAproxy.zip
file is in the Downloads directory. ls - Install apigeelint. sudo npm install -g apigeelint
- Enter your password at the prompt.
- Unzip the downloaded proxy. unzip LAproxy.zip
- Run apigeelint on the proxy folder. apigeelint -s apiproxy/ -f table.js
- Review the results.
- Change to your
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.