This page applies to Apigee and Apigee hybrid.
View
Apigee Edge documentation.
This page provides instructions for creating an Apigee API Management local development environment in Cloud Code for VS Code. See Overview of local development with Apigee for features in the local development environment.
The setup process requires completion of both of these sections of this guide:
Depending on your use cases, also complete Set up API proxy development for Apigee local development
Before you begin
To set up and use Apigee in VS Code, you need:
- A Google Cloud project to log into in your local development environment. The project needs to be provisioned for Apigee to create an Apigee local workspace where you can develop and test API proxies.
- (Recommended) API hub provisioned
on your project. API hub is required for creation of a
remote mock server for testing API specs.
If you do not want to add API hub to your project, you could associate the project with another project that has API hub enabled instead. See Attach a runtime project to an API hub for information on attaching a project to an API hub. - The Required roles to use API hub with Apigee local development for actions you plan to perform.
- Familiarity with VS Code, how to manage VS Code, and how to perform common actions such as accessing settings and installing extensions. See the VS Code documentation.
Install VS Code and the Cloud Code extension
This section provides the installation instructions for installing VS Code and the Cloud Code extension in VS Code. This is the first step in setting up local development for Apigee and is required to use any of the Apigee local development features
To install VS Code and the Cloud Code extension:
- Download and install Visual Studio Code (VS Code) on your local machine, if it is not already installed.
- Install the Cloud Code extension, as described in Install the Cloud Code extension. If you plan to manage API proxies in your local environment, install Docker as part of the process.
- (Recommended) Enable automatic updates for the Cloud Code extension. In Settings, search for Extensions: Auto Update and enable it for all extensions or for the Cloud Code extension individually.
- Restart VS Code.
Required roles to use Apigee API hub with Apigee local development
You'll need the roles listed below to perform API design and testing steps using Apigee API hub:
Task | Required Role(s) |
---|---|
View and edit API hub APIs | Cloud API Hub Editor or Admin |
Publish APIs to API hub | Cloud API Hub Editor or Admin |
Set up and manage a remote mock server to test APIs | Artifact Registry Administrator Cloud Build Service Account Cloud Run Admin Service Usage Admin See IAM basic and predefined roles reference. You must also have the gcloud CLI installed. |
Set up API proxy development for Apigee local development
Complete the steps in this section if you want to use your local development environment for Apigee API proxy development and testing. Also complete these steps to be able to create an API proxy from an OpenAPI spec.
- Create an Apigee workspace.
- Install the Apigee Emulator.
- Add a container for deploying to the Apigee Emulator.
What's next
After completing the installation and setup steps, get started using Cloud Code:
- Access and explore API Management in Cloud Code
- Build and deploy your first API proxy in local development