Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

HashiCorp Consul Catalog API

Register and query services and nodes

HashiCorp Consul Catalog API is one of 14 APIs that HashiCorp Consul publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Catalog. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, authentication docs, and a GitHub repository.

This API exposes 7 operations across 7 paths, and defines 5 schemas. It is described by OpenAPI 3.1.0, at version 1.18.0.

Requests are made against 2 base URLs: http://localhost:8500/v1, https://{consul_host}:{port}/v1.

7 operations 7 paths 5 schemas 5 GET2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.18.0
Base URL
http://localhost:8500/v1
Authentication
API Key
Contact
Resource Areas
1

Authentication & Security 1

HashiCorp Consul Catalog API declares 1 security scheme for authenticating requests. An API key is passed in the header as X-Consul-Token (ConsulToken). By default, every request must be authenticated.

  • ConsulToken — ACL token for authentication

Paths & Operations 7

Across 7 paths, the API surfaces 7 operations — 5 GET, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Catalog 7

Register and query services and nodes

PUT
/catalog/register
Register entity
catalogRegister body → 200
PUT
/catalog/deregister
Deregister entity
catalogDeregister body → 200
GET
/catalog/datacenters
List datacenters
listDatacenters → 200
GET
/catalog/nodes
List nodes
listCatalogNodes 3 params → 200
GET
/catalog/services
List services
listCatalogServices 2 params → 200
GET
/catalog/service/{serviceName}
List nodes for a service
getCatalogService 5 params → 200
GET
/catalog/node/{node}
List services for a node
getCatalogNode 3 params → 200

Schemas 5

The contract defines 5 schemas that model the data the API accepts and returns. The most detailed are CatalogServiceInstance (13 properties), HealthCheck (12 properties), AgentService (9 properties), CatalogNode (8 properties). Each schema is shown below with its type and property counts.

AgentService
object
9 properties
CatalogRegistration
object
7 properties 2 required
CatalogNode
object
8 properties
CatalogServiceInstance
object
13 properties
HealthCheck
object
12 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

consul-catalog-api-openapi.yml Raw ↑

Other APIs HashiCorp Consul publishes across the network.

HashiCorp Consul ACL API
HashiCorp Consul Agent API
HashiCorp Consul Config Entries API
HashiCorp Consul Connect API
HashiCorp Consul Coordinates API
HashiCorp Consul Events API
HashiCorp Consul Health API
HashiCorp Consul KV Store API
HashiCorp Consul Operator API
HashiCorp Consul Sessions API
HashiCorp Consul Snapshot API
HashiCorp Consul Status API