This directory provides scripts that configure your local environment and deploy sample API proxies to your organization on the Apigee API Platform.
Make sure you have the following installed and available on your PATH (recognizable when you run, for example, which curl
).
- cURL
- Python
- Cygwin on Windows: If you're running Cygwin on Windows, you'll also need the doc2unix utility. (The Cygwin installer lets you install the utility.) See the [Windows/Cygwin Troubleshooting] (#windowscygwin-troubleshooting) section for more information.
-
If you do not have an account yet, register one for free.
-
In the file
setenv.sh
, configure values for your organization, username, environment. -
Deploy the samples.
- To deploy individual samples, run
deploy.sh
from the./setup
directory. Follow prompts. - To deploy all samples, run
deploy_all.sh
from the./setup
directory. Follow prompts.
- To deploy individual samples, run
You can now go to the Apigee management UI and see the deployed proxies.
Alternatively, you can invoke the proxies from the command line. To do so, cd to the /sample-proxies
directory. Each sample API proxy directory contains an invoke.sh file. Run invoke.sh to submit a request to that sample API proxy.
In Cygwin on Windows, if you get an error saying '\r': command not found
, you'll need to run the dos2unix utility to convert line breaks in the shell (.sh) files. You may need to install the utility if the which dos2unix
command can't find it. The Cygwin installer should let you install it.
To run dos2unix recursively on the samples:
-
cd to the
/api-platform-samples
directory (the samples root directory). -
Run the following command:
find . -name *.sh |xargs dos2unix
-
If the command runs successfully, you can re-run the deploy script from the previous section.
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.