Imported Google Group message.
Date:Friday, 18 September 2015 15:17:25 UTC+1.
Yeah, the api-slug is actually used by the host manager when generating templates, the reasoning is as follows:
In an environment where there are many APIs, we don't want collisions on the listening handler (listen_path) so we auto-generate it (and actually you can make it non-editable using a configuration option so users don't mess things up). However, it may also be the case that you are using the host manager, and that you want to use your own domain/org/api combo to build your API paths (i.e. Tyk dictates routing has to be: domain.com/listen_path, not everyone wants that, but we need a concrete implementation somewhere).
So we have the api_slug (and owner_slug in the Organisation object), these values are of interest to the host manager and can be injected into nginx templates for routing whatever domain config you want.
So for example, in the quickstart docker, we set it up so that APis run on:
And on Tyk Cloud we set it up so that it's:
But you might want it to be:
All of that is possible with the host manager, and that's what the api_slug and owner_slug are for, they essentially get mapped to the listen_path so Tyk knows what to do. tyk only ever cares about the listen_path to do anything.
Might need to clarify that in our docs :-/