Building an API Proxy

Not applicable

Our organization has purchased a software that has an API allowing us to access the data for use in other applications. I would like to use APIgee as a proxy. In the apigee tutorials it shows how to setup a basic proxy however our api is not that basic. While we do not want applications to house the api key, I do want apigee to include this key in the request. The key is given by the software deveoper along with a specific url path. Here is the path

mycompany.apis.softwarecompany.com/v1/content?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&format=xml&method=get(search parameters)

Do I need to create a policy with the key? When I attempt that, it doesnt genereate the exact url needed. Again, the application contacting apigee for the data does not need to have the key, only apigee when contacting the companies api.

Can someone provide me some guidance as to how to build this API proxy?

0 2 237
2 REPLIES 2

so if i understand your question correctly

> your clients would call an API on Apigee - let's say - http://apigee-api.yourcompany.com?format=xml&method=get(search parameters)

> Now apigee would proxy this call to another API - mycompany.apis.softwarecompany.com/v1/content? -> it just need to add a query param named 'key' with some predefined value, along with other params - correct?

If thats the case, you could easily achieve it by creating a simple passthro proxy and using AssignMessage policy -

http://apigee.com/docs/api-services/reference/assign-message-policy#setelement

Mukundha, thank you for providing me with some direction. Unfortunately what sounds simple to you has left me very confused. I'm a new programmer and understand the concepts of the reading you have directed me too, however I am still unable to establish a proper connection with the target server's API.

Which flow do I attach the Assign Message Policy too? Proxy or Target Endpoints? Do I attach it to the Pre-flow? Or create a middle flow in the middle? do I add my static key as a parameter? or as a Path? The format XML and method GET will always remain the same. Should I add that to the same path/parameter as the key? Do I have to add a Service Call Policy after the Assign Message Policy? Do both policies attach to the same flow? or does one go to the pre of the Proxy and the other to the pre of the target?

How do I test to make sure I am establishing a connection?

Also, regarding your comment above. Apigee would proxy this call to another API that must look like this - http://mycompany.apis.softwarecompany.com/v1/content?{static_key_goes_here}&format=xml&method=get{&s...

The only item that the application needs to pass from the user should be the parameters. The rest of the url should remain the exact same.

How do I set up these parameters? Do I create a different Flow for each mix of parameters? And if so I do I tell the url to go down that flow or to use those parameters?

Thanks for your guidance on this.