You're
viewing Apigee X documentation.
View Apigee Edge documentation.
Create a simple proxy using the Proxy Editor in the Apigee UI, or using the API, as described in the following sections.
New Proxy Editor
To create a simple API proxy using the new Proxy Editor:
- Sign in to the Apigee UI.
- Click API Proxies in the main view.
- From the Environment drop-down list, select the environment in which you want
to create a new API proxy.
The Apigee UI displays a list of API proxies for that environment. If you haven't created any proxies yet, the list is empty.
- Click Create New.
The Create Proxy wizard starts.
- Click Reverse proxy (most common).
The Proxy details page is displayed.
- Configure your proxy with the following settings:
- Name: Enter
getstarted
. If a proxy already exists with this name, choose a different name. - Base Path: Leave this set to
/getstarted
. The Base Path is part of the URL used to make requests to your API. Apigee uses the URL to match and route incoming requests to the proper API proxy. - Description (Optional): Enter a description for your new API proxy, such
as
Get started API proxy
. - Target (Existing API): Enter
https://mocktarget.apigee.net
. This defines the target URL that Apigee invokes on a request to the API proxy. The mocktarget service is hosted at Apigee and returns simple data. It requires no API key or access token.
Your API proxy's details should look like the following:
- Name: Enter
- Click Next.
- In the Common policies view, under Security:
Authorization select Pass through (no authorization).
- On the Summary page, select the deployment environments, if desired,
and click Create and deploy.
Your new API proxy is created and deployed in the selected environment.
- Click Edit proxy to display
the Overview tab in the Proxy Editor.
If you see the Try now button, click it to view the new Overview page.
The Overview page is shown below.
In the Deployments list, the getstarted
API proxy deployment status is green for the test
environment.
Next steps
After you create a simple API proxy, you typically do one of the following:
- Add policies, security, and other features of the Apigee platform, as described in Understanding APIs and API proxies
- Deploy it to your cluster, as described in Deploy an API proxy.
Classic Proxy Editor
The Apigee UI provides an API Proxy Wizard that walks you through the steps to create a new API proxy.
To create a simple API proxy using the API Proxy Wizard:
- Sign in to the Apigee UI.
- Click API Proxies in the main view.
- From the Environment drop-down list, select the environment in which you want
to create a new API proxy.
The hybrid UI displays a list of API proxies for that environment. If you haven't created any proxies yet, the list is empty.
- Click Create New.
The Create Proxy wizard starts.
- Click Reverse proxy (most common).
The Proxy details page is displayed.
- Configure your proxy with the following settings:
- Name: Enter
getstarted
. If a proxy already exists with this name, choose a different name. - Base Path: Leave this set to
/getstarted
. The Base Path is part of the URL used to make requests to your API. Apigee uses the URL to match and route incoming requests to the proper API proxy. - Description (Optional): Enter a description for your new API proxy, such
as
Get started API proxy
. - Target (Existing API): Enter
https://mocktarget.apigee.net
. This defines the target URL that Apigee invokes on a request to the API proxy. The mocktarget service is hosted at Apigee and returns simple data. It requires no API key or access token.
Your API proxy's details should look like the following:
- Name: Enter
- Click Next.
- In the Common policies view, under Security:
Authorization select Pass through (no authorization).
- Click Next.
- On the Summary page, select the deployment environments, if desired,
and click Create and deploy.
Your new API proxy is created and deployed in the selected environment.
- Click Edit proxy to display the Overview tab in the Proxy Editor.
In the API proxies list, the getstarted
API proxy deployment status is green for the test
environment.
Next steps
After you create a simple API proxy, you typically do one of the following:
- Add policies, security, and other features of the Apigee platform, as described in Understanding APIs and API proxies.
- Deploy it to your cluster, as described in Deploy an API proxy.
Apigee API
Create an API proxy in your Apigee organization by issuing a POST
request to the following resource:
https://apigee.googleapis.com/v1/organizations/$ORG/apis
You must define the name of the API proxy using the name
query parameter. Restrict
the characters used in the name to the following: A-Za-z0-9._\-$ %
Optionally, you can import an API proxy configuration bundle by performing the following steps:
- Set the
action
query parameter toimport
- Set the
Content-type
header tomultipart/form-data
- Pass the name of the API proxy configuration bundle on your local file system
The following example demonstrates how to create an API proxy by importing an API proxy
configuration bundle (helloworld-config.zip
) on your local file system using the
API.
curl "https://apigee.googleapis.com/v1/organizations/$ORG/apis?name=helloworld&action=import" \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-type: multipart/form-data" \ -F "file=@helloworld-config.zip"
Where $TOKEN
is set to your OAuth 2.0 access token, as described in
Obtaining an OAuth 2.0 access token. For information about the curl
options used in this example, see
Using curl. For a description of the environment variables used,
see Setting environment variables for Apigee API requests.
The following provides an example of the response output:
{ "basepaths": [ "/helloworld" ], "configurationVersion": { "majorVersion": 4 }, "createdAt": "1559145292799", "displayName": "helloworld", "entityMetaDataAsProperties": { "bundle_type": "zip", "subType": "Proxy", "lastModifiedAt": "1559145292799", "createdAt": "1559145292799" }, "lastModifiedAt": "1559145292799", "name": "helloworld", "policies": [ "verify-api-key", "remove-query-param-apikey", "OAuth-v20-1" ], "proxies": [ "default" ], "proxyEndpoints": [ "default" ], "resourceFiles": {}, "targetEndpoints": [ "default" ], "targets": [ "default" ], "type": "Application", "revision": "1", "description": "Hello world" }
For more information on creating an API proxy, see the apis.create
method
in the Apigee API. To see all the methods available for API proxies, see the API proxies API.