Skip to content

API version query

API query /version shows:

  • API version.
  • Which server you are connected to, if STATUS_REGION environment variable is set.

Region

Purpose of this query is to be able to tell which server you are connected to, but without exposing actual location of server, which can help debug error. This is used in networks when many servers are running.

For example, public Iconify API servers are running multiple servers, placed in various locations all over the world. DNS is configured to redirect visitor to the closest server using AWS Route53 latency routing. This guarantees smallest possible response time. See building budged CDN article for details.

If something goes wrong, it would be nice to know which server is causing problems, but without exposing actual IP address of server and /version query solves that.

Query

API query is /version.

There are no parameters.

Response

Response plain text, showing version number.

Examples

Basic response:

Iconify API version 3.0.0-beta.1

Response with STATUS_REGION=DE:

Iconify API version 3.0.0-beta.1 (DE)

Configuration

In Node.js version of API you can configure result of this API query.

Query can be enabled or disabled using environment variable ENABLE_VERSION. Possible values: true or false:

ENABLE_VERSION=false

You can also set it in src/config/app.ts in enableVersion property, then rebuild API.

Region value can be set using STATUS_REGION environment variable. Value is a string:

STATUS_REGION=API1

You can also set it in src/config/app.ts in statusRegion property, then rebuild API.

Released under the Apache 2.0 License.