Skip to content
Branch: master
Find file History
Latest commit fc5b78b Sep 10, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
apiproxy Updating with $api_domain variable May 29, 2014

Javascript Composite Service ("Mashup")

This API Proxy sample "mashes up" responses from two APIs:

  • The Google Geocoding API
  • The Google Elevation API

The sample returns a JSON response that includes the geocoded location for the center of that postal code, and the elevation at that location.

This sample works exactly like "policy-mashup," except that the mechanism used is a whole JavaScript application, rather than a composition of a set of policies.

By comparing the two samples, you can get an idea of the tradeoffs between scripting behavior and using out-of-the-box policies provided by Apigee.

Creating an API Console

This sample is an application that exposes an API, and so demonstrates how the API Platform can used to develop and expose custom APIs that can be consumed by other developers.

The API Proxy exposes an API that takes two query parameters:

  • country: A two-letter country code
  • postalcode: A postal code valid in that country

The included WADL file demonstrates the Apigee-specific extensions to the WADL specification. This WADL file can be used to generate an interactive API Console, designed to be sued by other developers learning to invoke APIs you expose.

Create an Apigee Console To-Go and import and the WADL file.


API Platform JavaScript Object Model

API Platform Developer Guide topic

How To Setup an Apigee API Console


A sample request to invoke the sample:

curl "http://{org_name}"

Sample response:


Set up

What you need:

  • The username and password that you use to login to
  • The name of the organization in which you have an account. Login to and check account settings.


Update /setup/ with your environment details

Import and deploy sample project

To deploy, run $ sh

To test, run $ sh

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

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.

You can’t perform that action at this time.