From 3871c4810e86c4cd0be6e62f82c7edeeb113e7dc Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Fri, 18 Nov 2016 10:33:37 -0500 Subject: [PATCH 1/2] Attempt to describe entire response (for #2393) Describe fields returned by /v1/catalog/service/ --- .../docs/agent/http/catalog.html.markdown | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/website/source/docs/agent/http/catalog.html.markdown b/website/source/docs/agent/http/catalog.html.markdown index 4112672622a6..a14f48c1f580 100644 --- a/website/source/docs/agent/http/catalog.html.markdown +++ b/website/source/docs/agent/http/catalog.html.markdown @@ -261,19 +261,42 @@ It returns a JSON body like this: ```javascript [ { + "Address": "192.168.10.10", + "TaggedAddresses": { + "lan": "192.168.10.10", + "wan": "10.0.10.10" + }, + "CreateIndex": 51, + "ModifyIndex": 51, "Node": "foobar", - "Address": "10.1.10.12", - "ServiceID": "redis", - "ServiceName": "redis", - "ServiceTags": null, - "ServiceAddress": "", - "ServicePort": 8000 + "ServiceAddress": "172.17.0.3", + "ServiceEnableTagOverride": false, + "ServiceID": "32a2a47f7992:nodea:5000", + "ServiceName": "foobar", + "ServicePort": 5000, + "ServiceTags": [ + "tacos" + ] } ] ``` This endpoint supports blocking queries and all consistency modes. +The returned fields are as follows: + +- `Address`: IP address of the Consul node on which the service is registered +- `TaggedAddresses`: List of explicit LAN and WAN IP addresses for the agent +- `CreateIndex`: Internal index value representing when the service was created +- `ModifyIndex`: Last index that modified the service +- `Node`: Node name of the Consul node on which the service is registered +- `ServiceAddress`: IP address of the service host +- `ServiceEnableTagOverride`: Whether service tags can be overridden on this service +- `ServiceID`: A unique service instance identifier comprised of UUID, hostname and port +- `ServiceName`: Name of the service +- `ServicePort`: Port number of the service +- `ServiceTags`: List of tags for the service + ### /v1/catalog/node/\ This endpoint is hit with a GET and returns the node's registered services. From 940232890e7303cdc6046702d6c2328e0bf865f2 Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Fri, 18 Nov 2016 10:53:59 -0500 Subject: [PATCH 2/2] tweaks --- website/source/docs/agent/http/catalog.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/source/docs/agent/http/catalog.html.markdown b/website/source/docs/agent/http/catalog.html.markdown index a14f48c1f580..858dbabaf2d9 100644 --- a/website/source/docs/agent/http/catalog.html.markdown +++ b/website/source/docs/agent/http/catalog.html.markdown @@ -290,9 +290,9 @@ The returned fields are as follows: - `CreateIndex`: Internal index value representing when the service was created - `ModifyIndex`: Last index that modified the service - `Node`: Node name of the Consul node on which the service is registered -- `ServiceAddress`: IP address of the service host +- `ServiceAddress`: IP address of the service host — if empty, node address should be used - `ServiceEnableTagOverride`: Whether service tags can be overridden on this service -- `ServiceID`: A unique service instance identifier comprised of UUID, hostname and port +- `ServiceID`: A unique service instance identifier - `ServiceName`: Name of the service - `ServicePort`: Port number of the service - `ServiceTags`: List of tags for the service