jon-wei commented on a change in pull request #6128: Unified API doc page
URL: https://github.com/apache/incubator-druid/pull/6128#discussion_r208803477
 
 

 ##########
 File path: docs/content/operations/api-reference.md
 ##########
 @@ -0,0 +1,426 @@
+---
+layout: doc_page
+---
+
+# API Reference
+
+This page documents all of the API endpoints for each Druid service type.
+
+## Table of Contents
+  * [Coordinator](#coordinator)
+  * [Overlord](#overlord)
+  * [MiddleManager](#middlemanager)
+  * [Peon](#peon)
+  * [Broker](#broker)
+  * [Historical](#historical)
+
+## Common
+
+The following endpoints are supported by all nodes.
+
+### GET
+
+* `/status`
+
+Returns the Druid version, loaded extensions, memory used, total memory and 
other useful information about the node.
+
+* `/health`
+
+An endpoint that always returns a boolean "true" value with a 200 OK response, 
useful for automated health checks.
+
+* `/properties`
+
+Returns the current configuration properties of the node.
+
+## Coordinator
+
+HTTP Endpoints
+--------------
+
+The coordinator node exposes several HTTP endpoints for interactions.
+
+### GET
+
+#### Coordinator information
+
+* `/druid/coordinator/v1/leader`
+
+Returns the current leader coordinator of the cluster.
+
+* `/druid/coordinator/v1/isLeader`
+
+Returns a JSON object with field "leader", either true or false, indicating if 
this server is the current leader
+coordinator of the cluster. In addition, returns HTTP 200 if the server is the 
current leader and HTTP 404 if not.
+This is suitable for use as a load balancer status check if you only want the 
active leader to be considered in-service
+at the load balancer.
+
+* `/druid/coordinator/v1/loadstatus`
+
+Returns the percentage of segments actually loaded in the cluster versus 
segments that should be loaded in the cluster.
+
+ * `/druid/coordinator/v1/loadstatus?simple`
+
+Returns the number of segments left to load until segments that should be 
loaded in the cluster are available for queries. This does not include 
replication.
+
+* `/druid/coordinator/v1/loadstatus?full`
+
+Returns the number of segments left to load in each tier until segments that 
should be loaded in the cluster are all available. This includes replication.
+
+* `/druid/coordinator/v1/loadqueue`
+
+Returns the ids of segments to load and drop for each historical node.
+
+* `/druid/coordinator/v1/loadqueue?simple`
+
+Returns the number of segments to load and drop, as well as the total segment 
load and drop size in bytes for each historical node.
+
+* `/druid/coordinator/v1/loadqueue?full`
+
+Returns the serialized JSON of segments to load and drop for each historical 
node.
+
+#### Metadata store information
+
+* `/druid/coordinator/v1/metadata/datasources`
+
+Returns a list of the names of enabled datasources in the cluster.
+
+* `/druid/coordinator/v1/metadata/datasources?includeDisabled`
+
+Returns a list of the names of enabled and disabled datasources in the cluster.
+
+* `/druid/coordinator/v1/metadata/datasources?full`
+
+Returns a list of all enabled datasources with all metadata about those 
datasources as stored in the metadata store.
+
+* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}`
+
+Returns full metadata for a datasource as stored in the metadata store.
+
+* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments`
+
+Returns a list of all segments for a datasource as stored in the metadata 
store.
+
+* `/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full`
+
+Returns a list of all segments for a datasource with the full segment metadata 
as stored in the metadata store.
+
+* POST `/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments`
+
+Returns a list of all segments, overlapping with any of given intervals,  for 
a datasource as stored in the metadata store. Request body is array of string 
intervals like [interval1, interval2,...] for example 
["2012-01-01T00:00:00.000/2012-01-03T00:00:00.000", 
"2012-01-05T00:00:00.000/2012-01-07T00:00:00.000"]
+
+* POST 
`/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full`
+
+Returns a list of all segments, overlapping with any of given intervals, for a 
datasource with the full segment metadata as stored in the metadata store. 
Request body is array of string intervals like [interval1, interval2,...] for 
example ["2012-01-01T00:00:00.000/2012-01-03T00:00:00.000", 
"2012-01-05T00:00:00.000/2012-01-07T00:00:00.000"]
+
+* 
`/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}`
+
+Returns full segment metadata for a specific segment as stored in the metadata 
store.
+
+#### Datasources information
+
+* `/druid/coordinator/v1/datasources`
+
+Returns a list of datasource names found in the cluster.
+
+* `/druid/coordinator/v1/datasources?simple`
+
+Returns a list of JSON objects containing the name and properties of 
datasources found in the cluster.  Properties include segment count, total 
segment byte size, minTime, and maxTime.
+
+* `/druid/coordinator/v1/datasources?full`
+
+Returns a list of datasource names found in the cluster with all metadata 
about those datasources.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}`
+
+Returns a JSON object containing the name and properties of a datasource. 
Properties include segment count, total segment byte size, minTime, and maxTime.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}?full`
+
+Returns full metadata for a datasource .
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals`
+
+Returns a set of segment intervals.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals?simple`
+
+Returns a map of an interval to a JSON object containing the total byte size 
of segments and number of segments for that interval.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals?full`
+
+Returns a map of an interval to a map of segment metadata to a set of server 
names that contain the segment for that interval.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}`
+
+Returns a set of segment ids for an ISO8601 interval. Note that {interval} 
parameters are delimited by a `_` instead of a `/` (e.g., 
2016-06-27_2016-06-28).
+
+* 
`/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simple`
+
+Returns a map of segment intervals contained within the specified interval to 
a JSON object containing the total byte size of segments and number of segments 
for an interval.
+
+* 
`/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?full`
+
+Returns a map of segment intervals contained within the specified interval to 
a map of segment metadata to a set of server names that contain the segment for 
an interval.
+
+* 
`/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}/serverview`
+
+Returns a map of segment intervals contained within the specified interval to 
information about the servers that contain the segment for an interval.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/segments`
+
+Returns a list of all segments for a datasource in the cluster.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/segments?full`
+
+Returns a list of all segments for a datasource in the cluster with the full 
segment metadata.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}`
+
+Returns full segment metadata for a specific segment in the cluster.
+
+* `/druid/coordinator/v1/datasources/{dataSourceName}/tiers`
+
+Return the tiers that a datasource exists in.
+
+#### Rules
+
+* `/druid/coordinator/v1/rules`
+
+Returns all rules as JSON objects for all datasources in the cluster including 
the default datasource.
+
+* `/druid/coordinator/v1/rules/{dataSourceName}`
+
+Returns all rules for a specified datasource.
+
+
+* `/druid/coordinator/v1/rules/{dataSourceName}?full`
+
+Returns all rules for a specified datasource and includes default datasource.
+
+* `/druid/coordinator/v1/rules/history?interval=<interval>`
+
+ Returns audit history of rules for all datasources. default value of interval 
can be specified by setting `druid.audit.manager.auditHistoryMillis` (1 week if 
not configured) in coordinator runtime.properties
+
+* `/druid/coordinator/v1/rules/history?count=<n>`
+
+ Returns last <n> entries of audit history of rules for all datasources.
+
+* `/druid/coordinator/v1/rules/{dataSourceName}/history?interval=<interval>`
+
+ Returns audit history of rules for a specified datasource. default value of 
interval can be specified by setting `druid.audit.manager.auditHistoryMillis` 
(1 week if not configured) in coordinator runtime.properties
+
+* `/druid/coordinator/v1/rules/{dataSourceName}/history?count=<n>`
+
+ Returns last <n> entries of audit history of rules for a specified datasource.
+
+#### Intervals
+
+Note that {interval} parameters are delimited by a `_` instead of a `/` (e.g., 
2016-06-27_2016-06-28).
 
 Review comment:
   Hm, I think it's not worth doing for the time being

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to