From 56ab8c9000ff14c6dddbcfe829b0e0711386abb4 Mon Sep 17 00:00:00 2001 From: Paul Banks Date: Fri, 20 Jul 2018 16:50:28 +0100 Subject: [PATCH] Add /health/connect to docs and make consistent with /catalog/connect --- website/source/api/catalog.html.md | 63 +----------------------------- website/source/api/health.html.md | 17 +++++++- 2 files changed, 18 insertions(+), 62 deletions(-) diff --git a/website/source/api/catalog.html.md b/website/source/api/catalog.html.md index 331df26f21..d5a9160287 100644 --- a/website/source/api/catalog.html.md +++ b/website/source/api/catalog.html.md @@ -500,67 +500,8 @@ so this endpoint may be used to filter only the Connect-capable endpoints. | ------ | ---------------------------- | -------------------------- | | `GET` | `/catalog/connect/:service` | `application/json` | -The table below shows this endpoint's support for -[blocking queries](/api/index.html#blocking-queries), -[consistency modes](/api/index.html#consistency-modes), and -[required ACLs](/api/index.html#acls). - -| Blocking Queries | Consistency Modes | ACL Required | -| ---------------- | ----------------- | ------------------------ | -| `YES` | `all` | `node:read,service:read` | - -### Parameters - -- `service` `(string: )` - Specifies the name of the service for which - to list nodes. This is specified as part of the URL. - -- `dc` `(string: "")` - Specifies the datacenter to query. This will default to - the datacenter of the agent being queried. This is specified as part of the - URL as a query parameter. - -### Sample Request - -```text -$ curl \ - https://consul.rocks/v1/catalog/connect/my-service -``` - -### Sample Response - -```json -[ - { - "ID": "40e4a748-2192-161a-0510-9bf59fe950b5", - "Node": "foobar", - "Address": "192.168.10.10", - "Datacenter": "dc1", - "TaggedAddresses": { - "lan": "192.168.10.10", - "wan": "10.0.10.10" - }, - "NodeMeta": { - "somekey": "somevalue" - }, - "CreateIndex": 51, - "ModifyIndex": 51, - "ServiceAddress": "172.17.0.3", - "ServiceEnableTagOverride": false, - "ServiceID": "32a2a47f7992:nodea:5000", - "ServiceName": "foobar", - "ServiceKind": "connect-proxy", - "ServiceProxyDestination": "my-service", - "ServicePort": 5000, - "ServiceMeta": { - "foobar_meta_value": "baz" - }, - "ServiceTags": [ - "tacos" - ] - } -] -``` - -The fields are the same as listing nodes for a service. +Parameters and response format are the same as +[`/catalog/service/:service`](/api/catalog.html#list-nodes-for-service). ## List Services for Node diff --git a/website/source/api/health.html.md b/website/source/api/health.html.md index a404bda2e2..c48f1cfaa8 100644 --- a/website/source/api/health.html.md +++ b/website/source/api/health.html.md @@ -249,6 +249,21 @@ $ curl \ ] ``` +## List Nodes for Connect-capable Service + +This endpoint returns the nodes providing a +[Connect-capable](/docs/connect/index.html) service in a given datacenter. +This will include both proxies and native integrations. A service may +register both Connect-capable and incapable services at the same time, +so this endpoint may be used to filter only the Connect-capable endpoints. + +| Method | Path | Produces | +| ------ | ---------------------------- | -------------------------- | +| `GET` | `/health/connect/:service` | `application/json` | + +Parameters and response format are the same as +[`/health/service/:service`](/api/health.html#list-nodes-for-service). + ## List Checks in State This endpoint returns the checks in the state provided on the path. @@ -317,7 +332,7 @@ $ curl \ "Output": "", "ServiceID": "redis", "ServiceName": "redis", - "ServiceTags": ["primary"] + "ServiceTags": ["primary"] } ] ```