Skip to content

Latest commit

 

History

History

tools

Apigee Platform Samples Tools

Postman collection

The file api-platform-samples.json.postman_collection is a Postman collection that you can import into your Postman app. This Postman collection provides a convenient way to call the sample apps.

Note: The Postman collection is a work in progress. Currently, not all of the sample APIs are included in the Postman collection.

Note: Postman is a Google Chrome plugin app for testing REST APIs. Please refer to Postman docs for details about using the tool.

The collection is set up in such a way that variables are used to plug certain values into the APIs. You need to set up an environment in Postman that defines these variables. They include:

  • ORG -- The Apigee organization where you deployed the sample proxies.
  • ENV -- The environment where the samples are deployed.
  • BASICAUTH -- The base64-encoded value of your colon-separated Apigee email address and your password. You can also use the Basic Auth feature built-in to Postman to set this value on any request where it is required.
  • DOMAIN -- Your Apigee domain name. Typically this is apigee.net for Edge Cloud.
  • CLIENT-KEY -- A Consumer Key for a developer app in your organization. We recommend using the key from one of the apps that are provisioned when you run the utility in api-platform-samples/setup/provisioning.
  • MGMTSRVR -- For Cloud-based Edge, this value is https://api.enterprise.apigee.com.
  • DEV-EMAIL -- The email of any developer in your organization.
  • DEV-APP -- A developer app associated with the DEV-EMAIL developer.

API Proxy Generator

Requires curl to be installed.

A simple script that uses the Apigee API Platform API to generate an API proxy. The script downloads the API proxy generated by the API Platform, enabling you to customize it locally.

Use the Python Deploy Tool to import and deploy your API proxy as you iterate during development.

Run proxy_gen.sh and follow the prompts.

The API proxy will be downloaded and unzipped to a directory called /apiproxy

API Proxy Deploy Tool

Note: Most of the samples in api-platform-samples use the Python-based deploy tool described below, and you can use this tool for deploying proxies to Edge. However, be aware that another deployment tool option exists: apigeetool, a Node.js module for deploying proxies and Node.js apps to Apigee Edge. For now, most of the examples in api-platform-samples use the Python deploy tool. In the future, the samples may be revised to use apigeetool.

Requires Python to be installed.

This tool provides a simple command for importing and deploying an API proxy from your local machine to an environment on the Apigee API Platform.

You require an account in an organization at enterprise.apigee.com. Register for an account for free.

Usage

deploy.py -n {apiName} -u {myname:mypass} -o {myorg} -e {environment} -p {basePath} -d {path to /apiproxy directory}
  • -n The name of the API that will be created when this API proxy is uploaded to Apigee. The name will be the display name in the Apigee API Platform UI. If the API already exists, then the deploy tool will import this as a new revision of the existing API.

  • -u Your username and password for your account on enterprise.apigee.com. (Register for an account for free.)

  • -o The Apigee organization in which youhave an account. To obtain this information, login to enterprise.apigee.com and view account settings.

  • -e The environment in your organization where you would like this API Proxy to be deployed. Note that this script will automatically import and deploy the API proxy so that it is immediately available. Trial/cloud accounts be default have two environments: test and prod. Usually, you will set this to be the test environment.

    To get a list of available environments: curl -u myname:mypass https://api.enterprise.apigee.com/v1/o/{org_name}/environments/

  • -p The URI path used as a pattern match to route incoming message to this API proxy deployment. (Note that this is the deployment path. In most cases, you can set this value to '/', unless you have advanced deployment and routing requirements. The primary path used for API proxy routing is defined in the API proxy's ProxyEndpoint configuration.)

  • -d The path to the local directory where your API proxy files reside. Note that your API proxy files must be stored under a directory called /apiproxy. This script will ZIP your API proxy into a bundle, and import the bundle to Apigee API Platform environment for your organization. Note that this value points to the directory that contains the directory /apiproxy, and not to the /apiproxy directory itself.

  • -h Optional The base URL for the Apigee API. You do not need to specify or modify this for cloud/trial accounts. Defaults to https://api.enterprise.apigee.com

Organization Snapshot Tool

This tool allows retrieval of the settings of an organization. See the README in the org-snapshot directory.

You require an account in an organization at enterprise.apigee.com. Register for an account for free.

Ask the community

alt text


Copyright © 2015 Apigee Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.