how to create a reverse proxy using management apis

Hi

Hope you doing great!

I would like to create a reverse proxy with having httpbin.org/get endpoint with a simple policy attached any policy will be possible.
I know in the apigee management doc they have mentioned we can use multipart to do the multiple things in a single curl but didn't mentioned any sample of multipart stuff.
So could you please guide me how can i do these things

0 1 141
1 REPLY 1

Hi there,

By "use multipart to do the multiple things in a single curl" I assume that you are referencing the API's optional functionality to upload a proxy bundle zip file as well as create the API itself. The Apigee X documentation here does a great job at explaining this and even gives you an example curl command

curl "https://apigee.googleapis.com/v1/organizations/$ORG/apis?name=helloworld&action=import" \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-type: multipart/form-data" \
  -F "file=@helloworld-config.zip"

 The Apigee Edge documentation here also explains this, but as you said doesn't give a full example of how to use the multipart proxy bundle functionality. If you wish to upload a proxy bundle using Edge APIs your curl command may look something like this

curl "https://api.enterprise.apigee.com/v1/organizations/[ORG_NAME]/apis&action=import" \
  -X POST \
  -H "Authorization: Basic [YOUR_AUTH_INFO]" \
  -H "Content-Type=multipart/form-data"
  -F "file=@apiproxy.zip"

I hope this helps!