Skip to content

Commit

Permalink
Merge branch 'master' of github.com:apigee/api-platform-samples
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoChiesa committed Mar 9, 2018
2 parents 87060f4 + b4bc7c7 commit f2597a0
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 24 deletions.
4 changes: 2 additions & 2 deletions edge-ux/proxy-to-target/package.json
Expand Up @@ -11,8 +11,8 @@
},
"dependencies": {
"apigeetool": "mukundha/apigeetool-node",
"gulp": "*",
"gulp-util": "^3.0.7"
"gulp": ">3.9.1",
"gulp-util": "^3.0.8"
},
"author": "mukundha@apigee.com",
"license": "ISC"
Expand Down
33 changes: 19 additions & 14 deletions learn-edge/README.md
Expand Up @@ -14,33 +14,33 @@ The best way to learn Apigee Edge is by doing!

This is the recommended path through the examples. But you can do them in any order you wish. Each sample can be deployed and run independently:

1. [simplest-proxy](./simplest-proxy/README.md)
1. [simplest-proxy](./simplest-proxy/README.md)

>Learn to deploy and call a very simple proxy.
>Learn to deploy and call a very simple proxy.
2. [proxy-to-a-target](./proxy-to-a-target/README.md)

>Get back data from a backend target service.
>Get back data from a backend target service.
3. [apikey-security-1](./apikey-security-1/README.md)

>Secure an API with an API key.
>Secure an API with an API key.
4. [apikey-security-2](./apikey-security-1/README.md)
4. [apikey-security-2](./apikey-security-2/README.md)

>Prevent an API key from being passed to the backend target service.
4. [fault-handling-1](./fault-handling-1/README.md)

>Handle a proxy error and return a custom error message.
>Handle a proxy error and return a custom error message.
5. [fault-handling-2](./fault-handling-2/README.md)

>Learn more about how to do fault handling.
>Learn more about how to do fault handling.
5. [response-cache-1](./response-cache-1/README.md)

>Speed up your proxy performance with a response cache.
>Speed up your proxy performance with a response cache.
6. [response-cache-2](./response-cache-2/README.md)

Expand All @@ -49,14 +49,14 @@ This is the recommended path through the examples. But you can do them in any or
6. [extract-json-payload](./extract-json-payload/README.md)

>Extract data from a JSON payload and return the data in custom response headers.
7. [extract-json-payload-2](./extract-json-payload-2/README.md)

>Query for data to extract from a JSON response payload.
7. [extract-xml-payload](./extract-xml-payload/README.md)

>Extract data from an XML request body and set a custom XML response body.
>Extract data from an XML request body and set a custom XML response body.
7. [quota-1](./quota-1/README.md)

Expand All @@ -74,7 +74,7 @@ This is the recommended path through the examples. But you can do them in any or
### Prerequisites

1. You need an **Apigee account**. If you don't have an Apigee account, go to [https://login.apigee.com/login](https://login.apigee.com/login), and click Create Account.
2. You must install [apigeetool](https://www.npmjs.com/package/apigeetool). We use apigeetool to deploy the proxies.
2. You must install [apigeetool](https://www.npmjs.com/package/apigeetool). We use apigeetool to deploy the proxies.

`npm install -g apigeetool`

Expand All @@ -83,24 +83,29 @@ This is the recommended path through the examples. But you can do them in any or
2. Download or clone the [api-platform-samples](https://github.com/apigee/api-platform-samples) GitHub repo.
6. In a browser, sign in to your [Apigee account](http://apigee.com) and go to the API Management section. It'll be good to keep this browser window open as you work so you can view and trace the Learn Edge proxies in the UI.

**Troubleshooting:** If you've previously tried to run the sample and have
trouble with the script (for example, it's using the wrong organization
or the URL to invoke is incorrect), find and delete `HOME/learn-edge.rc`
on your local file system. Then re-deploy the sample.

That's it! To get started, go to the README for the first example proxy, [simplest-proxy](./simplest-proxy), and follow the instructions. On your filesystem, it is in the folder `api-platform-samples/learn-edge/simplest-proxy`.

### What you'll learn

We try not to clutter the lessons with a lot of explanation and background information. Rather, we expect you to learn by doing, by changing things, and fixing problems. When you complete the series, you will understand:

* The basic capabilities of Apigee Edge.
* Core concepts you'll need to be a successful Edge developer. They include security, fault handling, caching, quotas, and others.
* Core concepts you'll need to be a successful Edge developer. They include security, fault handling, caching, quotas, and others.
* How Edge projects are structured.
* How to do primary Edge development locally, on your laptop, rather than in the UI.
* How to deploy Edge proxies from your laptop to Edge.
* Basic debugging techniques.

**Tip:** If you want to dive deeper into any concept covered in this series, you can go to the [Apigee Edge documentation](http://docs.apigee.com/) and use Search to look up topics (search works very well and even picks up related topics in the [Apigee Community](https://community.apigee.com/index.html)). In a few cases, we'll provide a link if we think it will be especially helpful. You can also check out the Apigee Edge [4-Minute Video](https://www.youtube.com/playlist?list=PLIXjuPlujxxxe3iTmLtgfIBgpMo7iD7fk) series.
**Tip:** If you want to dive deeper into any concept covered in this series, you can go to the [Apigee Edge documentation](http://docs.apigee.com/) and use Search to look up topics (search works very well and even picks up related topics in the [Apigee Community](https://community.apigee.com/index.html)). In a few cases, we'll provide a link if we think it will be especially helpful. You can also check out the Apigee Edge [4-Minute Video](https://www.youtube.com/playlist?list=PLIXjuPlujxxxe3iTmLtgfIBgpMo7iD7fk) series.

### What you won't learn

* A lot of background, text-book style information. You'll learn by deploying and running example code on Apigee Edge. You can always read about features in the official [Apigee Edge documentation](http://docs.apigee.com/).
* A lot of background, text-book style information. You'll learn by deploying and running example code on Apigee Edge. You can always read about features in the official [Apigee Edge documentation](http://docs.apigee.com/).
* All of the possible use cases for Edge.
* All of the features included with Edge.
* All of the possible ways to use the features we introduce.
Expand Down
2 changes: 1 addition & 1 deletion learn-edge/extract-json-payload-2/README.md
Expand Up @@ -30,7 +30,7 @@ We assume you've provisioned the Product, Developer App, and Developer as explai

### Deploy it

1. `cd api-platform-samples/learn-edge/extract-json-payload`.
1. `cd api-platform-samples/learn-edge/extract-json-payload-2`.
2. `./deploy.sh`

### Run it
Expand Down
2 changes: 1 addition & 1 deletion learn-edge/provisioning/setup.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

## Ensure configuration variables have been set.
source ../../setup/userconf.sh || exit 1
Expand Down
2 changes: 1 addition & 1 deletion learn-edge/scripts/deploy_proxy.sh
Expand Up @@ -3,7 +3,7 @@
function deploy_proxy {
if hash apigeetool 2>/dev/null; then
printf "\n\nUsing apigeetool to deploy the proxy to the $env environment in the $org org to the $url url...\n\n"
apigeetool deployproxy -v -o $org -e $env --api learn-edge -L $url -d . -u $username -p $password -V
apigeetool deployproxy -o $org -e $env --api learn-edge -L $url -d . -u $username -p $password -V
printf "\nIf the deployment is successful, then your API Proxy is ready to be invoked.\n"
printf "\nRun 'invoke.sh'\n"
else
Expand Down
2 changes: 1 addition & 1 deletion learn-edge/service-callout-1/README.md
Expand Up @@ -16,7 +16,7 @@ We assume you've provisioned the Product, Developer App, and Developer as explai

### Deploy it

1. `cd api-platform-samples/learn-edge/extract-json-payload`.
1. `cd api-platform-samples/learn-edge/service-callout-1`.
2. `./deploy.sh`

### Run it
Expand Down
2 changes: 1 addition & 1 deletion learn-edge/service-callout-2/README.md
Expand Up @@ -18,7 +18,7 @@ We assume you've provisioned the Product, Developer App, and Developer as explai

### Deploy it

1. `cd api-platform-samples/learn-edge/extract-json-payload`.
1. `cd api-platform-samples/learn-edge/service-callout-2`.
2. `./deploy.sh`

### Run it
Expand Down
Expand Up @@ -13,7 +13,7 @@
"express-session": "^1.9.1",
"less-middleware": "^0.1.12",
"serve-favicon": "^2.1.6",
"validator": "^1.3.0"
"validator": ">2.0.0"
},
"devDependencies": {},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions sample-proxies/outbound-oauth/README.md
Expand Up @@ -67,9 +67,9 @@ A demo application that performs a search and renders the results in HTML is inc
1. Sign up for [Microsoft Translator API](http://www.microsofttranslator.com/dev/) access,
and replace the `clientId` and `clientSecret` in `apiproxy/resources/jsc/api-config.js` with your application credentials.

2. Create a cache in the organization and environment you will be deploying the bundle in, using the definition in `twitter-translate-cache.xml`. This is used to cache the Translator API access token across requests. Try the following command:
2. Create a cache in the organization and environment you will be deploying the bundle in, using the definition in `oauth-token-cache.xml`. This is used to cache the Translator API access token across requests. Try the following command:

```curl -v -X POST -H "Content-Type: application/xml" -d @twitter-translate-cache.xml https://api.enterprise.apigee.com/v1/organizations/$ORG/environments/$ENV/caches -u myname:mypass```
```curl -v -X POST -H "Content-Type: application/xml" -d @oauth-token-cache.xml https://api.enterprise.apigee.com/v1/organizations/$ORG/environments/$ENV/caches -u myname:mypass```

* The username and password that you use to login to enterprise.apigee.com.
* The name of the organization in which you have an account. Log in to
Expand Down

0 comments on commit f2597a0

Please sign in to comment.