Organization Path based URL

Hi we are testing the AIO on private cloud instance

Is it possible to expose API's via path based and not domain name?

ie. our base url is api.acme.com

We want to expose the following based on our orgs.

Let's say i have these orgs:

itdept/qa (env)

hrdept/eil

engineeringdept/prod

How do i set up the front end url so i can achieve this.

https://api.acme.com/itdept/qa/apiproxyname/

https://api.acme.com/hrdept/eil/apiprox2name/

https://api.acme.com/engineeringdept/prod/apixprox3name/

0 3 213
3 REPLIES 3

To achieve exactly what you have shown, you could set the proxy basepath:

<HTTPProxyConnection>
    <BasePath>/itdept/qa/apiproxyname</BasePath>
    <VirtualHost>secure</VirtualHost>
</HTTPProxyConnection>

Typically though, within an "Organization" in Edge you would create multiple Virtual Hosts to reflect the org / env, similar to what Apigee does in the cloud.

For example, within a single Edge "Organization" you could have the following Virtual Host configuration:

https://api.acme.com/{proxy-basepath}/{resource} (prod)

https://api-qa.acme.com/{proxy-basepath}/{resource}
https://api-eil.acme.com/{proxy-basepath}/{resource}

Another approach to manage APIs by company departments is to use a domain-based approach to your APIs, then using your names you would have:

https://api-qa.acme.com/itdept/apiproxyname/resource

In this case your proxy basepath is "itdept/apiproxyname".

Please take a look at the documentation for Virtual Hosts here: https://community.apigee.com/questions/58297/organization-path-based-url.html

Thanks Kurt for the info.

For the domain based approach such as this

https://api.acme.com/{proxy-basepath}/{resource} (prod)
https://api-qa.acme.com/{proxy-basepath}/{resource}
https://api-eil.acme.com/{proxy-basepath}/{resource}

The subdomain external DNS addresses are all pointing to the same Apigee instance (the same IP address)?

And Apigee will be able to "sort" out the incoming request to the appropriate org/env based on header/request?

Yes, on the "Organization" that's what the Virtual Hosts do. The pattern that Apigee uses for trial accounts in the Cloud is:

https://{ORG}-{ENV}.apigee.net/{proxy-basepath}/{resource}

For on-prem you can choose whatever convention you like, but you'll have to reserve those DNS names (or adjust /etc/hosts).

For AIO, yes its the same IP address, however, for a more robust implementation you would typically have multiple Routers behind a load balancer.