Skip to main content
The metadata service is not yet available in the SAO and SAN3 regions. Support for these regions will be added in a future update.
The instance metadata service provides a way for your bare metal servers to access their own metadata — such as hostname, IP addresses, network configuration, storage layout, and tags — through a local HTTP endpoint. It is available from within any running Latitude.sh bare metal server.

How it works

The metadata service runs on a link-local IP address (169.254.169.254) that is only reachable from within the server itself. Before querying metadata, you request a short-lived session token. You can then retrieve all metadata as a single JSON object or query individual fields by path.

Quick start

1

Get a session token

Request a session token with a TTL (time-to-live) in seconds. The token is returned in the response body.
2

Retrieve all metadata as JSON

Use the token to fetch the full metadata object:
3

Query individual fields

You can also retrieve specific fields by path:
The metadata service is only accessible from within the server. It cannot be reached from the public internet or from other servers.

Available fields

Common use cases

  • Network configuration — read interface details and IPs to configure networking at boot
  • Dynamic inventory — register the server in Ansible, Consul, or other inventory systems using its own metadata
  • Cloud-init scripts — combine with user data to build dynamic configuration scripts that adapt to the server’s environment
  • Application configuration — inject region, hostname, or tags into your application’s runtime config
For the complete schema, all available paths, and authentication details, see the Instance Metadata Service API reference.