Skip to content

Commit

Permalink
Checking samples into branch
Browse files Browse the repository at this point in the history
  • Loading branch information
u2000 committed Nov 5, 2012
1 parent 3107ede commit 9874c32
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*~
*.tmproj
12 changes: 1 addition & 11 deletions ApiKeyValidation/README.TXT → ApiKeyValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,12 @@ This reference helps in understanding the process of building, deploying, activa

--------------------------
Pre-Conditions
<<<<<<< HEAD

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

You can obtain a free account at http://enterprise.apigee.com/signup
=======
--------------------------
1. Identify server name/IP Address and port of the Apigee Gateway installation.
2. Identify the credentials for the Apigee Gateway installation.
3. Identify the organization, environment and virtual host name and port for your instance.
You can get this information from person who setup the Apigee installation.
4. Ensure you have Firefox with RestClient add-on enabled(https://addons.mozilla.org/en-US/firefox/addon/restclient/)
The instructions in this sample assume you are using Firefox add-on rest client but you may use any other rest client also.
>>>>>>> parent of 8982f12... changed readme type from txt to md

--------------------------
Configure sample project
Expand All @@ -68,4 +58,4 @@ If the apikey in not valid, server will return the following response,
Clean up
--------------------------
Run
$ ./cleanup.sh
$ ./cleanup.sh
File renamed without changes.
15 changes: 13 additions & 2 deletions ConditionalPolicies/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@

source setenv.sh


apiName=samples-conditional-policy
basePath=/condition

./cleanup.sh
find . -name '*.DS_Store' -type f -delete

##Cleanup
rm -rf apiproxy.zip
zip -r apiproxy apiproxy
sh cleanup.sh


##Import the sample in gateway instance.
curl -u $credentials "$url/v1/organizations/$org/apis?action=import&name=$apiName" -T apiproxy.zip -H "Content-Type: application/octet-stream" -X POST -k

../tools/deploy.py -n samples-conditional-policy -u $credentials -o $org -e $environment -d ../ConditionalPolicies
##Deploy the sample in gateway instance.
curl -u $credentials "$url/v1/organizations/$org/apis/$apiName/revisions/1/deployments?action=deploy&env=$environment&basepath=$basePath" -X POST -H "Content-Type: application/octet-stream" -k
1 change: 0 additions & 1 deletion ContentRouting/README.TXT

This file was deleted.

1 change: 1 addition & 0 deletions ContentRouting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Content Routing SAMPLE--------------------------DISCLAIMER: --------------------------Apigee API Platform Samples are designed to help you learn how to usethe Apigee API Platform.Learn more at http://apigee.com/docs Copyright 2012 Apigee CorporationLicensed under the Apache License, Version 2.0 (the "License"); you may not usethis file except in compliance with the License. You may obtain a copyof the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.--------------------------DescriptionThis sample demonstrates dynamic request routing by implementing simple scenario in which Apigee routes a request to Twitter or Facebook based on the value of an HTTP header specified in the request.--------------------------Pre-Conditions* The username and password that you use to login to enterprise.apigee.com.* The name of the organization in which you have an account. Login to enterprise.apigee.com and check account settings.You can obtain a free account at http://enterprise.apigee.com/signup--------------------------Configure sample project--------------------------Update the setenv.sh for you environment details--------------------------Import and deploy sample projectIn the installation directory, substitute your username, password, and Apigee organization, and run $ ../tools/deploy.py -n contentrouting -u {myname:mypass} -o {myorg} -e test -d ../ContentRouting--------------------------Test1. To test the deployed sample execute the below curl command, curl http://{myorg}-test.apigee.net/4g-samples-contentrouting/curl -v -H "routeTo: facebook" http://{myorg}-test.apigee.net/4g-samples-contentrouting/2. The first response should return Twitter and the second one from Facebook.--------------------------Clean upIn the installation directory, run $ ./cleanup.sh
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
62 changes: 0 additions & 62 deletions PassThruSample/README.TXT

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
Python Script Sample--------------------------DISCLAIMER: --------------------------Apigee API Platform Samples are designed to help you learn how to usethe Apigee API Platform.Learn more at http://apigee.com/docs Copyright 2012 Apigee CorporationLicensed under the Apache License, Version 2.0 (the "License"); you may not usethis file except in compliance with the License. You may obtain a copyof the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.--------------------------Description--------------------------This sample demonstrates a simple scenario of attaching a python script in the response that adds a header value to it.The proxy is using the facebook API for target endpointThis reference helps in understanding the process of building, deploying, activating and accessing this sample.--------------------------Pre-Conditions--------------------------1. Identify server name/IP Address and port of the Apigee Gateway installation.2. Identify the credentials for the Apigee Gateway installation.3. Identify the organization, environment and virtual host name and port for your instance.[You can get this information from person who setup the Apigee installation.]4. Get a rest client to test the bundle or test it using curl to view the header details - X-Apigee-Demo-Targetthe populated value would be the target name which in this case is 'facebook'--------------------------Configure sample project--------------------------Update the setenv.sh for you environment details--------------------------Import and deploy sample project--------------------------Execute "sh deploy.sh"--------------------------Testing--------------------------1. To test the deployed sample execute the below curl command, curl http://<virtualhost>:<port>/4g-samples-python2. The response should have an additional custom header as belowX-Apigee-Demo-target: facebook--------------------------Clean up--------------------------Execute "sh cleanup.sh"
Python Script Sample--------------------------DISCLAIMER: --------------------------Apigee API Platform Samples are designed to help you learn how to usethe Apigee API Platform.Learn more at http://apigee.com/docs Copyright 2012 Apigee CorporationLicensed under the Apache License, Version 2.0 (the "License"); you may not usethis file except in compliance with the License. You may obtain a copyof the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.--------------------------Description--------------------------This sample demonstrates a simple scenario of attaching a python script in the response that adds a header value to it.The proxy is using the facebook API for target endpointThis reference helps in understanding the process of building, deploying, activating and accessing this sample.--------------------------Pre-Conditions--------------------------1. Identify server name/IP Address and port of the Apigee Gateway installation.2. Identify the credentials for the Apigee Gateway installation.3. Identify the organization, environment and virtual host name and port for your instance.[You can get this information from person who setup the Apigee installation.]4. Get a rest client to test the bundle or test it using curl to view the header details - X-Apigee-Demo-Targetthe populated value would be the target name which in this case is 'facebook'--------------------------Configure sample project--------------------------Update the setenv.sh for you environment details--------------------------Import and deploy sample project--------------------------Execute "sh deploy.sh"--------------------------Testing--------------------------1. To test the deployed sample execute the below curl command, curl http://{myorg}-test.apigee.net/4g-samples-python2. The response should have an additional custom header as belowX-Apigee-Demo-target: facebook--------------------------Clean up--------------------------Execute "sh cleanup.sh"
Expand Down
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions Rohit-samples.tmproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>documents</key>
<array>
<dict>
<key>expanded</key>
<true/>
<key>name</key>
<string>api-platform-samples</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string></string>
</dict>
</array>
<key>fileHierarchyDrawerWidth</key>
<integer>282</integer>
<key>metaData</key>
<dict/>
<key>showFileHierarchyDrawer</key>
<true/>
<key>windowFrame</key>
<string>{{391, 158}, {1373, 816}}</string>
</dict>
</plist>
1 change: 0 additions & 1 deletion XMLToJSON/README.TXT

This file was deleted.

0 comments on commit 9874c32

Please sign in to comment.