# Service catalog

> Identity's service catalog lists every service's endpoints by region, so the OpenStack CLI and SDKs find services from the Identity URL alone.

The service catalog is the list of services that Identity returns with every token. For each
service it gives a type, such as `compute` or `network`, and the service's endpoints: one per
region and interface. Tools read the catalog to find a service, so the only URL you configure is
Identity's, `https://auth.vexxhost.net/v3`.

## Regions and interfaces

Most services run in each region separately, with an endpoint per region. A few services are
global: they have one endpoint that covers every region, and take the region as part of each
request instead. The catalog shows which is which.

Each endpoint also has an interface. Use `public`, which is the only interface reachable from the
internet. `internal` and `admin` endpoints are for internal use.

## Seeing your catalog

The catalog changes when new services or regions launch, so look it up rather than copying
endpoints into configuration. To see it:

```sh
openstack catalog list
openstack catalog show compute
openstack region list
```

Through the API, `GET https://auth.vexxhost.net/v3/auth/catalog` returns it for the token you send,
and the response to a token request includes it as `token.catalog`.

## Choosing a region

For a service that runs in each region, tools use the region you set:

* With the CLI, pass `--os-region-name <region>` or set `OS_REGION_NAME`.
* In `clouds.yaml`, set `region_name: <region>` in the cloud's entry.
* With the OpenStack SDK, pass `region_name` to `openstack.connect()`.

Set one region per `clouds.yaml` entry, and add an entry per region if you work in several.

## Overriding an endpoint

Tools should always find endpoints in the catalog. If you need to send one service's requests to
another URL, for example while testing, set an override for that service type in the cloud's
`clouds.yaml` entry. Write the service type with underscores:

```yaml title="~/.config/openstack/clouds.yaml"
clouds:
  vexxhost:
    block_storage_endpoint_override: https://block-storage.example.com/v3
```

In code, clients built on keystoneauth accept the same as `endpoint_override`.
