This page documents all of the API endpoints for each Druid service type.
The following endpoints are supported by all processes.
/statusReturns the Druid version, loaded extensions, memory used, total memory and other useful information about the process.
/status/healthAn endpoint that always returns a boolean “true” value with a 200 OK response, useful for automated health checks.
/status/propertiesReturns the current configuration properties of the process.
This section documents the API endpoints for the processes that reside on Master servers (Coordinators and Overlords) in the suggested three-server configuration.
/druid/coordinator/v1/leaderReturns the current leader Coordinator of the cluster.
/druid/coordinator/v1/isLeaderReturns 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/loadstatusReturns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster.
/druid/coordinator/v1/loadstatus?simpleReturns 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?fullReturns 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/loadqueueReturns the ids of segments to load and drop for each Historical process.
/druid/coordinator/v1/loadqueue?simpleReturns the number of segments to load and drop, as well as the total segment load and drop size in bytes for each Historical process.
/druid/coordinator/v1/loadqueue?fullReturns the serialized JSON of segments to load and drop for each Historical process.
/druid/coordinator/v1/metadata/datasourcesReturns a list of the names of enabled datasources in the cluster.
/druid/coordinator/v1/metadata/datasources?includeDisabledReturns a list of the names of enabled and disabled datasources in the cluster.
/druid/coordinator/v1/metadata/datasources?fullReturns 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}/segmentsReturns a list of all segments for a datasource as stored in the metadata store.
/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?fullReturns a list of all segments for a datasource with the full segment metadata as stored in the metadata store.
/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}Returns full segment metadata for a specific segment as stored in the metadata store.
/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segmentsReturns 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 IS0 8601 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?fullReturns 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 ISO 8601 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”]
Note that all interval URL parameters are ISO 8601 strings delimited by a _ instead of a / (e.g., 2016-06-27_2016-06-28).
/druid/coordinator/v1/datasourcesReturns a list of datasource names found in the cluster.
/druid/coordinator/v1/datasources?simpleReturns 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?fullReturns 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}?fullReturns full metadata for a datasource .
/druid/coordinator/v1/datasources/{dataSourceName}/intervalsReturns a set of segment intervals.
/druid/coordinator/v1/datasources/{dataSourceName}/intervals?simpleReturns 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?fullReturns 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 interval.
/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simpleReturns 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}?fullReturns 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}/serverviewReturns 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}/segmentsReturns a list of all segments for a datasource in the cluster.
/druid/coordinator/v1/datasources/{dataSourceName}/segments?fullReturns 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}/tiersReturn the tiers that a datasource exists in.
/druid/coordinator/v1/datasources/{dataSourceName}Enables all segments of datasource which are not overshadowed by others.
/druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}Enables a segment of a datasource.
/druid/coordinator/v1/datasources/{dataSourceName}Disables a datasource.
/druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}@Deprecated. /druid/coordinator/v1/datasources/{dataSourceName}?kill=true&interval={myInterval}Runs a Kill task for a given interval and datasource.
/druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}Disables a segment.
Note that all interval URL parameters are ISO 8601 strings delimited by a _ instead of a / (e.g., 2016-06-27_2016-06-28).
/druid/coordinator/v1/rulesReturns 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}?fullReturns 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 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 entries of audit history of rules for a specified datasource.
/druid/coordinator/v1/rules/{dataSourceName}POST with a list of rules in JSON form to update rules.
Optional Header Parameters for auditing the config change can also be specified.
| Header Param Name | Description | Default |
|---|---|---|
X-Druid-Author | author making the config change | "" |
X-Druid-Comment | comment describing the change being done | "" |
Note that all interval URL parameters are ISO 8601 strings delimited by a _ instead of a / (e.g., 2016-06-27_2016-06-28).
/druid/coordinator/v1/intervalsReturns all intervals for all datasources with total size and count.
/druid/coordinator/v1/intervals/{interval}Returns aggregated total size and count for all intervals that intersect given isointerval.
/druid/coordinator/v1/intervals/{interval}?simpleReturns total size and count for each interval within given isointerval.
/druid/coordinator/v1/intervals/{interval}?fullReturns total size and count for each datasource for each interval within given isointerval.
/druid/coordinator/v1/config/compactionReturns all compaction configs.
/druid/coordinator/v1/config/compaction/{dataSource}Returns a compaction config of a dataSource.
/druid/coordinator/v1/config/compaction/taskslots?ratio={someRatio}&max={someMaxSlots}Update the capacity for compaction tasks. ratio and max are used to limit the max number of compaction tasks. They mean the ratio of the total task slots to the copmaction task slots and the maximum number of task slots for compaction tasks, respectively. The actual max number of compaction tasks is min(max, ratio * total task slots). Note that ratio and max are optional and can be omitted. If they are omitted, default values (0.1 and unbounded) will be set for them.
/druid/coordinator/v1/config/compactionCreates or updates the compaction config for a dataSource. See Compaction Configuration for configuration details.
/druid/coordinator/v1/config/compaction/{dataSource}Removes the compaction config for a dataSource.
/druid/coordinator/v1/serversReturns a list of servers URLs using the format {hostname}:{port}. Note that processes that run with different types will appear multiple times with different ports.
/druid/coordinator/v1/servers?simpleReturns a list of server data objects in which each object has the following keys:
host: host URL include ({hostname}:{port})type: process type (indexer-executor, historical)currSize: storage size currently usedmaxSize: maximum storage sizeprioritytier/druid/indexer/v1/leaderReturns the current leader Overlord of the cluster. If you have multiple Overlords, just one is leading at any given time. The others are on standby.
/druid/indexer/v1/isLeaderThis returns a JSON object with field “leader”, either true or false. In addition, this call 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.
Note that all interval URL parameters are ISO 8601 strings delimited by a _ instead of a / (e.g., 2016-06-27_2016-06-28).
/druid/indexer/v1/tasksRetrieve list of tasks. Accepts query string parameters state, datasource, createdTimeInterval, max, and type.
| Query Parameter | Description |
|---|---|
state | filter list of tasks by task state, valid options are running, complete, waiting, and pending. |
datasource | return tasks filtered by Druid datasource. |
createdTimeInterval | return tasks created within the specified interval. |
max | maximum number of "complete" tasks to return. Only applies when state is set to "complete". |
type | filter tasks by task type. See task documentation for more details. |
/druid/indexer/v1/completeTasksRetrieve list of complete tasks. Equivalent to /druid/indexer/v1/tasks?state=complete.
/druid/indexer/v1/runningTasksRetrieve list of running tasks. Equivalent to /druid/indexer/v1/tasks?state=running.
/druid/indexer/v1/waitingTasksRetrieve list of waiting tasks. Equivalent to /druid/indexer/v1/tasks?state=waiting.
/druid/indexer/v1/pendingTasksRetrieve list of pending tasks. Equivalent to /druid/indexer/v1/tasks?state=pending.
/druid/indexer/v1/task/{taskId}Retrieve the ‘payload’ of a task.
/druid/indexer/v1/task/{taskId}/statusRetrieve the status of a task.
/druid/indexer/v1/task/{taskId}/segmentsRetrieve information about the segments of a task.
/druid/indexer/v1/task/{taskId}/reportsRetrieve a task completion report for a task. Only works for completed tasks.
/druid/indexer/v1/taskEndpoint for submitting tasks and supervisor specs to the Overlord. Returns the taskId of the submitted task.
/druid/indexer/v1/task/{taskId}/shutdownShuts down a task.
/druid/indexer/v1/datasources/{dataSource}/shutdownAllTasksShuts down all tasks for a dataSource.
/druid/indexer/v1/taskStatusRetrieve list of task status objects for list of task id strings in request body.
/druid/indexer/v1/pendingSegments/{dataSource}Manually clean up pending segments table in metadata storage for datasource. Returns a JSON object response with numDeleted and count of rows deleted from the pending segments table. This API is used by the druid.coordinator.kill.pendingSegments.on coordinator setting which automates this operation to perform periodically.
/druid/indexer/v1/supervisorReturns a list of strings of the currently active supervisor ids.
/druid/indexer/v1/supervisor?fullReturns a list of objects of the currently active supervisors.
| Field | Type | Description |
|---|---|---|
id | String | supervisor unique identifier |
spec | SupervisorSpec | json specification of supervisor (See Supervisor Configuration for details) |
/druid/indexer/v1/supervisor/<supervisorId>Returns the current spec for the supervisor with the provided ID.
/druid/indexer/v1/supervisor/<supervisorId>/statusReturns the current status of the supervisor with the provided ID.
/druid/indexer/v1/supervisor/historyReturns an audit history of specs for all supervisors (current and past).
/druid/indexer/v1/supervisor/<supervisorId>/historyReturns an audit history of specs for the supervisor with the provided ID.
/druid/indexer/v1/supervisorCreate a new supervisor or update an existing one.
/druid/indexer/v1/supervisor/<supervisorId>/suspendSuspend the current running supervisor of the provided ID. Responds with updated SupervisorSpec.
/druid/indexer/v1/supervisor/suspendAllSuspend all supervisors at once.
/druid/indexer/v1/supervisor/<supervisorId>/resumeResume indexing tasks for a supervisor. Responds with updated SupervisorSpec.
/druid/indexer/v1/supervisor/resumeAllResume all supervisors at once.
/druid/indexer/v1/supervisor/<supervisorId>/resetReset the specified supervisor.
/druid/indexer/v1/supervisor/<supervisorId>/terminateTerminate a supervisor of the provided ID.
/druid/indexer/v1/supervisor/terminateAllTerminate all supervisors at once.
/druid/indexer/v1/supervisor/<supervisorId>/shutdownShutdown a supervisor.
See Overlord Dynamic Configuration for details.
Note that all interval URL parameters are ISO 8601 strings delimited by a _ instead of a / (e.g., 2016-06-27_2016-06-28).
/druid/indexer/v1/workerRetreives current overlord dynamic configuration.
/druid/indexer/v1/worker/history?interval={interval}&counter={count}Retrieves history of changes to overlord dynamic configuration. Accepts interval and count query string parameters to filter by interval and limit the number of results respectively.
/druid/indexer/v1/scalingRetrieves overlord scaling events if auto-scaling runners are in use.
Update overlord dynamic worker configuration.
This section documents the API endpoints for the processes that reside on Data servers (MiddleManagers/Peons and Historicals) in the suggested three-server configuration.
/druid/worker/v1/enabledCheck whether a MiddleManager is in an enabled or disabled state. Returns JSON object keyed by the combined druid.host and druid.port with the boolean state as the value.
{"localhost:8091":true}
/druid/worker/v1/tasksRetrieve a list of active tasks being run on MiddleManager. Returns JSON list of taskid strings. Normal usage should prefer to use the /druid/indexer/v1/tasks Overlord API or one of it's task state specific variants instead.
["index_wikiticker_2019-02-11T02:20:15.316Z"]
/druid/worker/v1/task/{taskid}/logRetrieve task log output stream by task id. Normal usage should prefer to use the /druid/indexer/v1/task/{taskId}/log Overlord API instead.
/druid/worker/v1/disable‘Disable’ a MiddleManager, causing it to stop accepting new tasks but complete all existing tasks. Returns JSON object keyed by the combined druid.host and druid.port:
{"localhost:8091":"disabled"}
/druid/worker/v1/enable‘Enable’ a MiddleManager, allowing it to accept new tasks again if it was previously disabled. Returns JSON object keyed by the combined druid.host and druid.port:
{"localhost:8091":"enabled"}
/druid/worker/v1/task/{taskid}/shutdownShutdown a running task by taskid. Normal usage should prefer to use the /druid/indexer/v1/task/{taskId}/shutdown Overlord API instead. Returns JSON:
{"task":"index_kafka_wikiticker_f7011f8ffba384b_fpeclode"}
/druid/worker/v1/chat/{taskId}/rowStatsRetrieve a live row stats report from a Peon. See task reports for more details.
/druid/worker/v1/chat/{taskId}/unparseableEventsRetrieve an unparseable events report from a Peon. See task reports for more details.
/druid/historical/v1/loadstatusReturns JSON of the form {"cacheInitialized":<value>}, where value is either true or false indicating if all segments in the local cache have been loaded. This can be used to know when a Historical process is ready to be queried after a restart.
/druid/historical/v1/readinessSimilar to /druid/historical/v1/loadstatus, but instead of returning JSON with a flag, responses 200 OK if segments in the local cache have been loaded, and 503 SERVICE UNAVAILABLE, if they haven't.
This section documents the API endpoints for the processes that reside on Query servers (Brokers) in the suggested three-server configuration.
Note that all interval URL parameters are ISO 8601 strings delimited by a _ instead of a / (e.g., 2016-06-27_2016-06-28).
/druid/v2/datasourcesReturns a list of queryable datasources.
/druid/v2/datasources/{dataSourceName}Returns the dimensions and metrics of the datasource. Optionally, you can provide request parameter “full” to get list of served intervals with dimensions and metrics being served for those intervals. You can also provide request param “interval” explicitly to refer to a particular interval.
If no interval is specified, a default interval spanning a configurable period before the current time will be used. The default duration of this interval is specified in ISO 8601 duration format via:
druid.query.segmentMetadata.defaultHistory
/druid/v2/datasources/{dataSourceName}/dimensionsReturns the dimensions of the datasource.
/druid/v2/datasources/{dataSourceName}/metricsReturns the metrics of the datasource.
/druid/v2/datasources/{dataSourceName}/candidates?intervals={comma-separated-intervals}&numCandidates={numCandidates}Returns segment information lists including server locations for the given datasource and intervals. If “numCandidates” is not specified, it will return all servers for each interval.
/druid/broker/v1/loadstatusReturns a flag indicating if the Broker knows about all segments in Zookeeper. This can be used to know when a Broker process is ready to be queried after a restart.
/druid/v2/The endpoint for submitting queries. Accepts an option ?pretty that pretty prints the results.
/druid/v2/candidates/Returns segment information lists including server locations for the given query..