blob: 08435f91f277edb5f8eee4a032ffab00cc857b85 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3212],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?i(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function l(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)a=i[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=d(a),c=r,k=p["".concat(s,".").concat(c)]||p[c]||m[c]||i;return a?n.createElement(k,o(o({ref:t},u),{},{components:a})):n.createElement(k,o({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var d=2;d<i;d++)o[d]=a[d];return n.createElement.apply(null,o)}return n.createElement.apply(null,a)}c.displayName="MDXCreateElement"},6452:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>k,frontMatter:()=>l,metadata:()=>d,toc:()=>p});var n=a(7462),r=a(3366),i=(a(7294),a(3905)),o=["components"],l={id:"api-reference",title:"API reference"},s=void 0,d={unversionedId:"operations/api-reference",id:"operations/api-reference",title:"API reference",description:"\x3c!--",source:"@site/docs/26.0.0/operations/api-reference.md",sourceDirName:"operations",slug:"/operations/api-reference",permalink:"/docs/26.0.0/operations/api-reference",draft:!1,tags:[],version:"current",frontMatter:{id:"api-reference",title:"API reference"},sidebar:"docs",previous:{title:"Alerts",permalink:"/docs/26.0.0/operations/alerts"},next:{title:"High availability",permalink:"/docs/26.0.0/operations/high-availability"}},u={},p=[{value:"Common",id:"common",level:2},{value:"Process information",id:"process-information",level:3},{value:"Master server",id:"master-server",level:2},{value:"Coordinator",id:"coordinator",level:3},{value:"Leadership",id:"leadership",level:4},{value:"Segment loading",id:"segment-loading",level:4},{value:"Segment loading by datasource",id:"segment-loading-by-datasource",level:4},{value:"Metadata store information",id:"metadata-store-information",level:4},{value:"POST",id:"post",level:5},{value:"Datasources",id:"datasources",level:4},{value:"Note for coordinator&#39;s POST and DELETE API&#39;s",id:"note-for-coordinators-post-and-delete-apis",level:4},{value:"Retention rules",id:"retention-rules",level:4},{value:"Intervals",id:"intervals",level:4},{value:"Dynamic configuration",id:"dynamic-configuration",level:4},{value:"Automatic compaction status",id:"automatic-compaction-status",level:4},{value:"Automatic compaction configuration",id:"automatic-compaction-configuration",level:4},{value:"Server information",id:"server-information",level:4},{value:"Overlord",id:"overlord",level:3},{value:"Leadership",id:"leadership-1",level:4},{value:"Tasks",id:"tasks",level:4},{value:"Supervisors",id:"supervisors",level:4},{value:"Dynamic configuration",id:"dynamic-configuration-1",level:4},{value:"Data server",id:"data-server",level:2},{value:"MiddleManager",id:"middlemanager",level:3},{value:"Peon",id:"peon",level:3},{value:"Historical",id:"historical",level:3},{value:"Segment loading",id:"segment-loading-1",level:4},{value:"Query server",id:"query-server",level:2},{value:"Broker",id:"broker",level:3},{value:"Datasource information",id:"datasource-information",level:4},{value:"Load Status",id:"load-status",level:4},{value:"Queries",id:"queries",level:4},{value:"Router",id:"router",level:3}],m={toc:p},c="wrapper";function k(e){var t=e.components,a=(0,r.Z)(e,o);return(0,i.kt)(c,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"This page documents all of the API endpoints for each Druid service type."),(0,i.kt)("h2",{id:"common"},"Common"),(0,i.kt)("p",null,"The following endpoints are supported by all processes."),(0,i.kt)("h3",{id:"process-information"},"Process information"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /status")),(0,i.kt)("p",null,"Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the process."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /status/health")),(0,i.kt)("p",null,'An endpoint that always returns a boolean "true" value with a 200 OK response, useful for automated health checks.'),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /status/properties")),(0,i.kt)("p",null,"Returns the current configuration properties of the process."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /status/selfDiscovered/status")),(0,i.kt)("p",null,"Returns a JSON map of the form ",(0,i.kt)("inlineCode",{parentName:"p"},'{"selfDiscovered": true/false}'),', indicating whether the node has received a confirmation\nfrom the central node discovery mechanism (currently ZooKeeper) of the Druid cluster that the node has been added to the\ncluster. It is recommended to not consider a Druid node "healthy" or "ready" in automated deployment/container\nmanagement systems until it returns ',(0,i.kt)("inlineCode",{parentName:"p"},'{"selfDiscovered": true}'),' from this endpoint. This is because a node may be\nisolated from the rest of the cluster due to network issues and it doesn\'t make sense to consider nodes "healthy" in\nthis case. Also, when nodes such as Brokers use ZooKeeper segment discovery for building their view of the Druid cluster\n(as opposed to HTTP segment discovery), they may be unusable until the ZooKeeper client is fully initialized and starts\nto receive data from the ZooKeeper cluster. ',(0,i.kt)("inlineCode",{parentName:"p"},'{"selfDiscovered": true}')," is a proxy event indicating that the ZooKeeper\nclient on the node has started to receive data from the ZooKeeper cluster and it's expected that all segments and other\nnodes will be discovered by this node timely from this point."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /status/selfDiscovered")),(0,i.kt)("p",null,"Similar to ",(0,i.kt)("inlineCode",{parentName:"p"},"/status/selfDiscovered/status"),", but returns 200 OK response with empty body if the node has discovered itself\nand 503 SERVICE UNAVAILABLE if the node hasn't discovered itself yet. This endpoint might be useful because some\nmonitoring checks such as AWS load balancer health checks are not able to look at the response body."),(0,i.kt)("h2",{id:"master-server"},"Master server"),(0,i.kt)("p",null,"This section documents the API endpoints for the processes that reside on Master servers (Coordinators and Overlords)\nin the suggested ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/design/processes#server-types"},"three-server configuration"),"."),(0,i.kt)("h3",{id:"coordinator"},"Coordinator"),(0,i.kt)("h4",{id:"leadership"},"Leadership"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/leader")),(0,i.kt)("p",null,"Returns the current leader Coordinator of the cluster."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/isLeader")),(0,i.kt)("p",null,'Returns a JSON object with field "leader", either true or false, indicating if this server is the current leader\nCoordinator of the cluster. In addition, returns HTTP 200 if the server is the current leader and HTTP 404 if not.\nThis is suitable for use as a load balancer status check if you only want the active leader to be considered in-service\nat the load balancer.'),(0,i.kt)("a",{name:"coordinator-segment-loading"}),(0,i.kt)("h4",{id:"segment-loading"},"Segment loading"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus")),(0,i.kt)("p",null,"Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus?simple")),(0,i.kt)("p",null,"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 segment replication counts."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus?full")),(0,i.kt)("p",null,"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 segment replication counts."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadstatus?full&computeUsingClusterView")),(0,i.kt)("p",null,"Returns the number of segments not yet loaded for each tier until all segments loading in the cluster are available.\nThe result includes segment replication counts. It also factors in the number of available nodes that are of a service type that can load the segment when computing the number of segments remaining to load.\nA segment is considered fully loaded when:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Druid has replicated it the number of times configured in the corresponding load rule."),(0,i.kt)("li",{parentName:"ul"},"Or the number of replicas for the segment in each tier where it is configured to be replicated equals the available nodes of a service type that are currently allowed to load the segment in the tier.")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadqueue")),(0,i.kt)("p",null,"Returns the ids of segments to load and drop for each Historical process."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadqueue?simple")),(0,i.kt)("p",null,"Returns the number of segments to load and drop, as well as the total segment load and drop size in bytes for each Historical process."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/loadqueue?full")),(0,i.kt)("p",null,"Returns the serialized JSON of segments to load and drop for each Historical process."),(0,i.kt)("h4",{id:"segment-loading-by-datasource"},"Segment loading by datasource"),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," query parameters are ISO 8601 strings (e.g., 2016-06-27/2016-06-28).\nAlso note that these APIs only guarantees that the segments are available at the time of the call.\nSegments can still become missing because of historical process failures or any other reasons afterward."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?forceMetadataRefresh={boolean}&interval={myInterval}")),(0,i.kt)("p",null,"Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster for the given\ndatasource over the given interval (or last 2 weeks if interval is not given). ",(0,i.kt)("inlineCode",{parentName:"p"},"forceMetadataRefresh")," is required to be set. "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Setting ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to true will force the coordinator to poll latest segment metadata from the metadata store\n(Note: ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh=true")," refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms\nof the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)"),(0,i.kt)("li",{parentName:"ul"},"Setting ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to false will use the metadata cached on the coordinator from the last force/periodic refresh.\nIf no used segments are found for the given inputs, this API returns ",(0,i.kt)("inlineCode",{parentName:"li"},"204 No Content"))),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?simple&forceMetadataRefresh={boolean}&interval={myInterval}")),(0,i.kt)("p",null,"Returns the number of segments left to load until segments that should be loaded in the cluster are available for the given datasource\nover the given interval (or last 2 weeks if interval is not given). This does not include segment replication counts. ",(0,i.kt)("inlineCode",{parentName:"p"},"forceMetadataRefresh")," is required to be set. "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Setting ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to true will force the coordinator to poll latest segment metadata from the metadata store\n(Note: ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh=true")," refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms\nof the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)"),(0,i.kt)("li",{parentName:"ul"},"Setting ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to false will use the metadata cached on the coordinator from the last force/periodic refresh.\nIf no used segments are found for the given inputs, this API returns ",(0,i.kt)("inlineCode",{parentName:"li"},"204 No Content")," ")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?full&forceMetadataRefresh={boolean}&interval={myInterval}")),(0,i.kt)("p",null,"Returns the number of segments left to load in each tier until segments that should be loaded in the cluster are all available for the given datasource over the given interval (or last 2 weeks if interval is not given). This includes segment replication counts. ",(0,i.kt)("inlineCode",{parentName:"p"},"forceMetadataRefresh")," is required to be set. "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Setting ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to true will force the coordinator to poll latest segment metadata from the metadata store\n(Note: ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh=true")," refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms\nof the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)"),(0,i.kt)("li",{parentName:"ul"},"Setting ",(0,i.kt)("inlineCode",{parentName:"li"},"forceMetadataRefresh")," to false will use the metadata cached on the coordinator from the last force/periodic refresh. ")),(0,i.kt)("p",null,"You can pass the optional query parameter ",(0,i.kt)("inlineCode",{parentName:"p"},"computeUsingClusterView")," to factor in the available cluster services when calculating\nthe segments left to load. See ",(0,i.kt)("a",{parentName:"p",href:"#coordinator-segment-loading"},"Coordinator Segment Loading")," for details.\nIf no used segments are found for the given inputs, this API returns ",(0,i.kt)("inlineCode",{parentName:"p"},"204 No Content")),(0,i.kt)("h4",{id:"metadata-store-information"},"Metadata store information"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#segments-table"},(0,i.kt)("inlineCode",{parentName:"a"},"sys.segments"))," table.")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments")),(0,i.kt)("p",null,"Returns a list of all segments for each datasource enabled in the cluster."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments?datasources={dataSourceName1}&datasources={dataSourceName2}")),(0,i.kt)("p",null,"Returns a list of all segments for one or more specific datasources enabled in the cluster."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus")),(0,i.kt)("p",null,"Returns a list of all segments for each datasource with the full segment metadata and an extra field ",(0,i.kt)("inlineCode",{parentName:"p"},"overshadowed"),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&datasources={dataSourceName1}&datasources={dataSourceName2}")),(0,i.kt)("p",null,"Returns a list of all segments for one or more specific datasources with the full segment metadata and an extra field ",(0,i.kt)("inlineCode",{parentName:"p"},"overshadowed"),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources")),(0,i.kt)("p",null,"Returns a list of the names of datasources with at least one used segment in the cluster, retrieved from the metadata database. Users should call this API to get the eventual state that the system will be in."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources?includeUnused")),(0,i.kt)("p",null,"Returns a list of the names of datasources, regardless of whether there are used segments belonging to those datasources in the cluster or not."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources?includeDisabled")),(0,i.kt)("p",null,"Returns a list of the names of datasources, regardless of whether the datasource is disabled or not."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources?full")),(0,i.kt)("p",null,"Returns a list of all datasources with at least one used segment in the cluster. Returns all metadata about those datasources as stored in the metadata store."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}")),(0,i.kt)("p",null,"Returns full metadata for a datasource as stored in the metadata store."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments")),(0,i.kt)("p",null,"Returns a list of all segments for a datasource as stored in the metadata store."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full")),(0,i.kt)("p",null,"Returns a list of all segments for a datasource with the full segment metadata as stored in the metadata store."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}")),(0,i.kt)("p",null,"Returns full segment metadata for a specific segment as stored in the metadata store, if the segment is used. If the\nsegment is unused, or is unknown, a 404 response is returned."),(0,i.kt)("h5",{id:"post"},"POST"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments")),(0,i.kt)("p",null,"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 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"]'),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full")),(0,i.kt)("p",null,"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 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"]'),(0,i.kt)("a",{name:"coordinator-datasources"}),(0,i.kt)("h4",{id:"datasources"},"Datasources"),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources")),(0,i.kt)("p",null,"Returns a list of datasource names found in the cluster as seen by the coordinator. This view is updated every ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/configuration/#coordinator-operation"},(0,i.kt)("inlineCode",{parentName:"a"},"druid.coordinator.period")),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources?simple")),(0,i.kt)("p",null,"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, replicated total segment byte size, minTime, and maxTime."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources?full")),(0,i.kt)("p",null,"Returns a list of datasource names found in the cluster with all metadata about those datasources."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}")),(0,i.kt)("p",null,"Returns a JSON object containing the name and properties of a datasource. Properties include segment count, total segment byte size, replicated total segment byte size, minTime, and maxTime."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}?full")),(0,i.kt)("p",null,"Returns full metadata for a datasource ."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals")),(0,i.kt)("p",null,"Returns a set of segment intervals."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?simple")),(0,i.kt)("p",null,"Returns a map of an interval to a JSON object containing the total byte size of segments and number of segments for that interval."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?full")),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}")),(0,i.kt)("p",null,"Returns a set of segment ids for an interval."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simple")),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?full")),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}/serverview")),(0,i.kt)("p",null,"Returns a map of segment intervals contained within the specified interval to information about the servers that contain the segment for an interval."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/segments")),(0,i.kt)("p",null,"Returns a list of all segments for a datasource in the cluster."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/segments?full")),(0,i.kt)("p",null,"Returns a list of all segments for a datasource in the cluster with the full segment metadata."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}")),(0,i.kt)("p",null,"Returns full segment metadata for a specific segment in the cluster."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/datasources/{dataSourceName}/tiers")),(0,i.kt)("p",null,"Return the tiers that a datasource exists in."),(0,i.kt)("h4",{id:"note-for-coordinators-post-and-delete-apis"},"Note for coordinator's POST and DELETE API's"),(0,i.kt)("p",null,"The segments would be enabled when these API's are called, but then can be disabled again by the coordinator if any dropRule matches. Segments enabled by these API's might not be loaded by historical processes if no loadRule matches. If an indexing or kill task runs at the same time as these API's are invoked, the behavior is undefined. Some segments might be killed and others might be enabled. It's also possible that all segments might be disabled but at the same time, the indexing task is able to read data from those segments and succeed."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Caution : Avoid using indexing or kill tasks and these API's at the same time for the same datasource and time chunk. (It's fine if the time chunks or datasource don't overlap)")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/datasources/{dataSourceName}")),(0,i.kt)("p",null,"Marks as used all segments belonging to a datasource. Returns a JSON object of the form\n",(0,i.kt)("inlineCode",{parentName:"p"},'{"numChangedSegments": <number>}')," with the number of segments in the database whose state has been changed (that is,\nthe segments were marked as used) as the result of this API call."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}")),(0,i.kt)("p",null,"Marks as used a segment of a datasource. Returns a JSON object of the form ",(0,i.kt)("inlineCode",{parentName:"p"},'{"segmentStateChanged": <boolean>}')," with\nthe boolean indicating if the state of the segment has been changed (that is, the segment was marked as used) as the\nresult of this API call."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/datasources/{dataSourceName}/markUsed")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/datasources/{dataSourceName}/markUnused")),(0,i.kt)("p",null,"Marks segments (un)used for a datasource by interval or set of segment Ids. When marking used only segments that are not overshadowed will be updated."),(0,i.kt)("p",null,"The request payload contains the interval or set of segment Ids to be marked unused.\nEither interval or segment ids should be provided, if both or none are provided in the payload, the API would throw an error (400 BAD REQUEST)."),(0,i.kt)("p",null,"Interval specifies the start and end times as IS0 8601 strings. ",(0,i.kt)("inlineCode",{parentName:"p"},"interval=(start/end)")," where start and end both are inclusive and only the segments completely contained within the specified interval will be disabled, partially overlapping segments will not be affected."),(0,i.kt)("p",null,"JSON Request Payload:"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Key"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Example"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"interval")),(0,i.kt)("td",{parentName:"tr",align:null},"The interval for which to mark segments unused"),(0,i.kt)("td",{parentName:"tr",align:null},'"2015-09-12T03:00:00.000Z/2015-09-12T05:00:00.000Z"')),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"segmentIds")),(0,i.kt)("td",{parentName:"tr",align:null},"Set of segment Ids to be marked unused"),(0,i.kt)("td",{parentName:"tr",align:null},'["segmentId1", "segmentId2"]')))),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"DELETE /druid/coordinator/v1/datasources/{dataSourceName}")),(0,i.kt)("p",null,"Marks as unused all segments belonging to a datasource. Returns a JSON object of the form\n",(0,i.kt)("inlineCode",{parentName:"p"},'{"numChangedSegments": <number>}')," with the number of segments in the database whose state has been changed (that is,\nthe segments were marked as unused) as the result of this API call."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"DELETE /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}"),"\n",(0,i.kt)("inlineCode",{parentName:"p"},"@Deprecated. /druid/coordinator/v1/datasources/{dataSourceName}?kill=true&interval={myInterval}")),(0,i.kt)("p",null,"Runs a ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/ingestion/tasks"},"Kill task")," for a given interval and datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"DELETE /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}")),(0,i.kt)("p",null,"Marks as unused a segment of a datasource. Returns a JSON object of the form ",(0,i.kt)("inlineCode",{parentName:"p"},'{"segmentStateChanged": <boolean>}')," with\nthe boolean indicating if the state of the segment has been changed (that is, the segment was marked as unused) as the\nresult of this API call."),(0,i.kt)("h4",{id:"retention-rules"},"Retention rules"),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules")),(0,i.kt)("p",null,"Returns all rules as JSON objects for all datasources in the cluster including the default datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules/{dataSourceName}")),(0,i.kt)("p",null,"Returns all rules for a specified datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules/{dataSourceName}?full")),(0,i.kt)("p",null,"Returns all rules for a specified datasource and includes default datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules/history?interval=<interval>")),(0,i.kt)("p",null,"Returns audit history of rules for all datasources. default value of interval can be specified by setting ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.audit.manager.auditHistoryMillis")," (1 week if not configured) in Coordinator runtime.properties"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules/history?count=<n>")),(0,i.kt)("p",null,"Returns last ",(0,i.kt)("inlineCode",{parentName:"p"},"n")," entries of audit history of rules for all datasources."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules/{dataSourceName}/history?interval=<interval>")),(0,i.kt)("p",null,"Returns audit history of rules for a specified datasource. default value of interval can be specified by setting ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.audit.manager.auditHistoryMillis")," (1 week if not configured) in Coordinator runtime.properties"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/rules/{dataSourceName}/history?count=<n>")),(0,i.kt)("p",null,"Returns last ",(0,i.kt)("inlineCode",{parentName:"p"},"n")," entries of audit history of rules for a specified datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/rules/{dataSourceName}")),(0,i.kt)("p",null,"POST with a list of rules in JSON form to update rules."),(0,i.kt)("p",null,"Optional Header Parameters for auditing the config change can also be specified."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Header Param Name"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"X-Druid-Author")),(0,i.kt)("td",{parentName:"tr",align:null},"author making the config change"),(0,i.kt)("td",{parentName:"tr",align:null},'""')),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"X-Druid-Comment")),(0,i.kt)("td",{parentName:"tr",align:null},"comment describing the change being done"),(0,i.kt)("td",{parentName:"tr",align:null},'""')))),(0,i.kt)("h4",{id:"intervals"},"Intervals"),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals")),(0,i.kt)("p",null,"Returns all intervals for all datasources with total size and count."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals/{interval}")),(0,i.kt)("p",null,"Returns aggregated total size and count for all intervals that intersect given isointerval."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals/{interval}?simple")),(0,i.kt)("p",null,"Returns total size and count for each interval within given isointerval."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/intervals/{interval}?full")),(0,i.kt)("p",null,"Returns total size and count for each datasource for each interval within given isointerval."),(0,i.kt)("h4",{id:"dynamic-configuration"},"Dynamic configuration"),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/configuration/#dynamic-configuration"},"Coordinator Dynamic Configuration")," for details."),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/config")),(0,i.kt)("p",null,"Retrieves current coordinator dynamic configuration."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/config/history?interval={interval}&count={count}")),(0,i.kt)("p",null,"Retrieves history of changes to overlord dynamic configuration. Accepts ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"count")," query string parameters\nto filter by interval and limit the number of results respectively."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/config")),(0,i.kt)("p",null,"Update overlord dynamic worker configuration."),(0,i.kt)("h4",{id:"automatic-compaction-status"},"Automatic compaction status"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/compaction/progress?dataSource={dataSource}")),(0,i.kt)("p",null,"Returns the total size of segments awaiting compaction for the given dataSource. The specified dataSource must have ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/data-management/automatic-compaction"},"automatic compaction")," enabled."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/compaction/status")),(0,i.kt)("p",null,"Returns the status and statistics from the auto-compaction run of all dataSources which have auto-compaction enabled in the latest run. The response payload includes a list of ",(0,i.kt)("inlineCode",{parentName:"p"},"latestStatus")," objects. Each ",(0,i.kt)("inlineCode",{parentName:"p"},"latestStatus")," represents the status for a dataSource (which has/had auto-compaction enabled).\nThe ",(0,i.kt)("inlineCode",{parentName:"p"},"latestStatus")," object has the following keys:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dataSource"),": name of the datasource for this status information"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"scheduleStatus"),": auto-compaction scheduling status. Possible values are ",(0,i.kt)("inlineCode",{parentName:"li"},"NOT_ENABLED")," and ",(0,i.kt)("inlineCode",{parentName:"li"},"RUNNING"),". Returns ",(0,i.kt)("inlineCode",{parentName:"li"},"RUNNING ")," if the dataSource has an active auto-compaction config submitted. Otherwise, returns ",(0,i.kt)("inlineCode",{parentName:"li"},"NOT_ENABLED"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bytesAwaitingCompaction"),": total bytes of this datasource waiting to be compacted by the auto-compaction (only consider intervals/segments that are eligible for auto-compaction)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bytesCompacted"),": total bytes of this datasource that are already compacted with the spec set in the auto-compaction config"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bytesSkipped"),": total bytes of this datasource that are skipped (not eligible for auto-compaction) by the auto-compaction"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"segmentCountAwaitingCompaction"),": total number of segments of this datasource waiting to be compacted by the auto-compaction (only consider intervals/segments that are eligible for auto-compaction)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"segmentCountCompacted"),": total number of segments of this datasource that are already compacted with the spec set in the auto-compaction config"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"segmentCountSkipped"),": total number of segments of this datasource that are skipped (not eligible for auto-compaction) by the auto-compaction"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"intervalCountAwaitingCompaction"),": total number of intervals of this datasource waiting to be compacted by the auto-compaction (only consider intervals/segments that are eligible for auto-compaction)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"intervalCountCompacted"),": total number of intervals of this datasource that are already compacted with the spec set in the auto-compaction config"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"intervalCountSkipped"),": total number of intervals of this datasource that are skipped (not eligible for auto-compaction) by the auto-compaction")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/compaction/status?dataSource={dataSource}")),(0,i.kt)("p",null,"Similar to the API ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/coordinator/v1/compaction/status")," above but filters response to only return information for the {dataSource} given.\nNote that {dataSource} given must have/had auto-compaction enabled."),(0,i.kt)("h4",{id:"automatic-compaction-configuration"},"Automatic compaction configuration"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/config/compaction")),(0,i.kt)("p",null,"Returns all automatic compaction configs."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/config/compaction/{dataSource}")),(0,i.kt)("p",null,"Returns an automatic compaction config of a dataSource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/config/compaction/{dataSource}/history?interval={interval}&count={count}")),(0,i.kt)("p",null,"Returns the history of the automatic compaction config for a dataSource. Optionally accepts ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"count"),"\nquery string parameters to filter by interval and limit the number of results respectively. If the dataSource does not\nexist or there is no compaction history for the dataSource, an empty list is returned."),(0,i.kt)("p",null,"The response contains a list of objects with the following keys:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"globalConfig"),": A json object containing automatic compaction config that applies to the entire cluster. "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"compactionConfig"),": A json object containing the automatic compaction config for the datasource."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"auditInfo"),": A json object that contains information about the change made - like ",(0,i.kt)("inlineCode",{parentName:"li"},"author"),", ",(0,i.kt)("inlineCode",{parentName:"li"},"comment")," and ",(0,i.kt)("inlineCode",{parentName:"li"},"ip"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"auditTime"),": The date and time when the change was made.")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/config/compaction/taskslots?ratio={someRatio}&max={someMaxSlots}")),(0,i.kt)("p",null,"Update the capacity for compaction tasks. ",(0,i.kt)("inlineCode",{parentName:"p"},"ratio")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"max")," are used to limit the max number of compaction tasks.\nThey mean the ratio of the total task slots to the compaction task slots and the maximum number of task slots for compaction tasks, respectively. The actual max number of compaction tasks is ",(0,i.kt)("inlineCode",{parentName:"p"},"min(max, ratio * total task slots)"),".\nNote that ",(0,i.kt)("inlineCode",{parentName:"p"},"ratio")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"max")," are optional and can be omitted. If they are omitted, default values (0.1 and unbounded)\nwill be set for them."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/coordinator/v1/config/compaction")),(0,i.kt)("p",null,"Creates or updates the ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/data-management/automatic-compaction"},"automatic compaction")," config for a dataSource. See ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/configuration/#automatic-compaction-dynamic-configuration"},"Automatic compaction dynamic configuration")," for configuration details."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"DELETE /druid/coordinator/v1/config/compaction/{dataSource}")),(0,i.kt)("p",null,"Removes the automatic compaction config for a dataSource."),(0,i.kt)("h4",{id:"server-information"},"Server information"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/servers")),(0,i.kt)("p",null,"Returns a list of servers URLs using the format ",(0,i.kt)("inlineCode",{parentName:"p"},"{hostname}:{port}"),". Note that\nprocesses that run with different types will appear multiple times with different\nports."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/coordinator/v1/servers?simple")),(0,i.kt)("p",null,"Returns a list of server data objects in which each object has the following keys:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"host"),": host URL include (",(0,i.kt)("inlineCode",{parentName:"li"},"{hostname}:{port}"),")"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"type"),": process type (",(0,i.kt)("inlineCode",{parentName:"li"},"indexer-executor"),", ",(0,i.kt)("inlineCode",{parentName:"li"},"historical"),")"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"currSize"),": storage size currently used"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"maxSize"),": maximum storage size"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"priority")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"tier"))),(0,i.kt)("h3",{id:"overlord"},"Overlord"),(0,i.kt)("h4",{id:"leadership-1"},"Leadership"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/leader")),(0,i.kt)("p",null,"Returns 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."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/isLeader")),(0,i.kt)("p",null,'This returns a JSON object with field "leader", either true or false. In addition, this call returns HTTP 200 if the\nserver is the current leader and HTTP 404 if not. This is suitable for use as a load balancer status check if you\nonly want the active leader to be considered in-service at the load balancer.'),(0,i.kt)("h4",{id:"tasks"},"Tasks"),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/tasks")),(0,i.kt)("p",null,"Retrieve list of tasks. Accepts query string parameters ",(0,i.kt)("inlineCode",{parentName:"p"},"state"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"datasource"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"createdTimeInterval"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"max"),", and ",(0,i.kt)("inlineCode",{parentName:"p"},"type"),"."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Query Parameter"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"state")),(0,i.kt)("td",{parentName:"tr",align:null},"filter list of tasks by task state, valid options are ",(0,i.kt)("inlineCode",{parentName:"td"},"running"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"complete"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"waiting"),", and ",(0,i.kt)("inlineCode",{parentName:"td"},"pending"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"datasource")),(0,i.kt)("td",{parentName:"tr",align:null},"return tasks filtered by Druid datasource.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"createdTimeInterval")),(0,i.kt)("td",{parentName:"tr",align:null},"return tasks created within the specified interval.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"max")),(0,i.kt)("td",{parentName:"tr",align:null},"maximum number of ",(0,i.kt)("inlineCode",{parentName:"td"},'"complete"')," tasks to return. Only applies when ",(0,i.kt)("inlineCode",{parentName:"td"},"state")," is set to ",(0,i.kt)("inlineCode",{parentName:"td"},'"complete"'),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"type")),(0,i.kt)("td",{parentName:"tr",align:null},"filter tasks by task type. See ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/ingestion/tasks"},"task documentation")," for more details.")))),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/completeTasks")),(0,i.kt)("p",null,"Retrieve list of complete tasks. Equivalent to ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=complete"),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/runningTasks")),(0,i.kt)("p",null,"Retrieve list of running tasks. Equivalent to ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=running"),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/waitingTasks")),(0,i.kt)("p",null,"Retrieve list of waiting tasks. Equivalent to ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=waiting"),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/pendingTasks")),(0,i.kt)("p",null,"Retrieve list of pending tasks. Equivalent to ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks?state=pending"),"."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/task/{taskId}")),(0,i.kt)("p",null,"Retrieve the 'payload' of a task."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/task/{taskId}/status")),(0,i.kt)("p",null,"Retrieve the status of a task."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/task/{taskId}/segments")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"This API is deprecated and will be removed in future releases.")),(0,i.kt)("p",null,"Retrieve information about the segments of a task."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/task/{taskId}/reports")),(0,i.kt)("p",null,"Retrieve a ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/ingestion/tasks#task-reports"},"task completion report")," for a task. Only works for completed tasks."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/task")),(0,i.kt)("p",null,"Endpoint for submitting tasks and supervisor specs to the Overlord. Returns the taskId of the submitted task."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/task/{taskId}/shutdown")),(0,i.kt)("p",null,"Shuts down a task."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/datasources/{dataSource}/shutdownAllTasks")),(0,i.kt)("p",null,"Shuts down all tasks for a dataSource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/taskStatus")),(0,i.kt)("p",null,"Retrieve list of task status objects for list of task id strings in request body."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"DELETE /druid/indexer/v1/pendingSegments/{dataSource}")),(0,i.kt)("p",null,"Manually clean up pending segments table in metadata storage for ",(0,i.kt)("inlineCode",{parentName:"p"},"datasource"),". Returns a JSON object response with\n",(0,i.kt)("inlineCode",{parentName:"p"},"numDeleted")," and count of rows deleted from the pending segments table. This API is used by the\n",(0,i.kt)("inlineCode",{parentName:"p"},"druid.coordinator.kill.pendingSegments.on")," ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/configuration/#coordinator-operation"},"coordinator setting"),"\nwhich automates this operation to perform periodically."),(0,i.kt)("h4",{id:"supervisors"},"Supervisors"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/supervisor")),(0,i.kt)("p",null,"Returns a list of strings of the currently active supervisor ids."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/supervisor?full")),(0,i.kt)("p",null,"Returns a list of objects of the currently active supervisors."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Field"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"id")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"supervisor unique identifier")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"state")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"basic state of the supervisor. Available states:",(0,i.kt)("inlineCode",{parentName:"td"},"UNHEALTHY_SUPERVISOR"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"UNHEALTHY_TASKS"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"PENDING"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"RUNNING"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"SUSPENDED"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"STOPPING"),". Check ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/development/extensions-core/kafka-supervisor-operations"},"Kafka Docs")," for details.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"detailedState")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"supervisor specific state. (See documentation of specific supervisor for details), e.g. ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/development/extensions-core/kafka-ingestion"},"Kafka")," or ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/development/extensions-core/kinesis-ingestion"},"Kinesis"),")")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"healthy")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"true or false indicator of overall supervisor health")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"spec")),(0,i.kt)("td",{parentName:"tr",align:null},"SupervisorSpec"),(0,i.kt)("td",{parentName:"tr",align:null},"json specification of supervisor (See Supervisor Configuration for details)")))),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/supervisor?state=true")),(0,i.kt)("p",null,"Returns a list of objects of the currently active supervisors and their current state."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Field"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"id")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"supervisor unique identifier")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"state")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"basic state of the supervisor. Available states: ",(0,i.kt)("inlineCode",{parentName:"td"},"UNHEALTHY_SUPERVISOR"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"UNHEALTHY_TASKS"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"PENDING"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"RUNNING"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"SUSPENDED"),", ",(0,i.kt)("inlineCode",{parentName:"td"},"STOPPING"),". Check ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/development/extensions-core/kafka-supervisor-operations"},"Kafka Docs")," for details.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"detailedState")),(0,i.kt)("td",{parentName:"tr",align:null},"String"),(0,i.kt)("td",{parentName:"tr",align:null},"supervisor specific state. (See documentation of the specific supervisor for details, e.g. ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/development/extensions-core/kafka-ingestion"},"Kafka")," or ",(0,i.kt)("a",{parentName:"td",href:"/docs/26.0.0/development/extensions-core/kinesis-ingestion"},"Kinesis"),")")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"healthy")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"true or false indicator of overall supervisor health")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"suspended")),(0,i.kt)("td",{parentName:"tr",align:null},"Boolean"),(0,i.kt)("td",{parentName:"tr",align:null},"true or false indicator of whether the supervisor is in suspended state")))),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/supervisor/<supervisorId>")),(0,i.kt)("p",null,"Returns the current spec for the supervisor with the provided ID."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/supervisor/<supervisorId>/status")),(0,i.kt)("p",null,"Returns the current status of the supervisor with the provided ID."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET/druid/indexer/v1/supervisor/history")),(0,i.kt)("p",null,"Returns an audit history of specs for all supervisors (current and past)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/supervisor/<supervisorId>/history")),(0,i.kt)("p",null,"Returns an audit history of specs for the supervisor with the provided ID."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor")),(0,i.kt)("p",null,"Create a new supervisor or update an existing one."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/<supervisorId>/suspend")),(0,i.kt)("p",null,"Suspend the current running supervisor of the provided ID. Responds with updated SupervisorSpec."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/suspendAll")),(0,i.kt)("p",null,"Suspend all supervisors at once."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/<supervisorId>/resume")),(0,i.kt)("p",null,"Resume indexing tasks for a supervisor. Responds with updated SupervisorSpec."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/resumeAll")),(0,i.kt)("p",null,"Resume all supervisors at once."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/<supervisorId>/reset")),(0,i.kt)("p",null,"Reset the specified supervisor."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/<supervisorId>/terminate")),(0,i.kt)("p",null,"Terminate a supervisor of the provided ID."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/terminateAll")),(0,i.kt)("p",null,"Terminate all supervisors at once."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/supervisor/<supervisorId>/shutdown")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"This API is deprecated and will be removed in future releases.\nPlease use the equivalent 'terminate' instead.")),(0,i.kt)("p",null,"Shutdown a supervisor."),(0,i.kt)("h4",{id:"dynamic-configuration-1"},"Dynamic configuration"),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/configuration/#overlord-dynamic-configuration"},"Overlord Dynamic Configuration")," for details."),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/worker")),(0,i.kt)("p",null,"Retrieves current overlord dynamic configuration."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/worker/history?interval={interval}&count={count}")),(0,i.kt)("p",null,"Retrieves history of changes to overlord dynamic configuration. Accepts ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"count")," query string parameters\nto filter by interval and limit the number of results respectively."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/workers")),(0,i.kt)("p",null,"Retrieves a list of all the worker nodes in the cluster along with its metadata."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/indexer/v1/scaling")),(0,i.kt)("p",null,"Retrieves overlord scaling events if auto-scaling runners are in use."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/indexer/v1/worker")),(0,i.kt)("p",null,"Update overlord dynamic worker configuration."),(0,i.kt)("h2",{id:"data-server"},"Data server"),(0,i.kt)("p",null,"This section documents the API endpoints for the processes that reside on Data servers (MiddleManagers/Peons and Historicals)\nin the suggested ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/design/processes#server-types"},"three-server configuration"),"."),(0,i.kt)("h3",{id:"middlemanager"},"MiddleManager"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/worker/v1/enabled")),(0,i.kt)("p",null,"Check whether a MiddleManager is in an enabled or disabled state. Returns JSON object keyed by the combined ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.host"),"\nand ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.port")," with the boolean state as the value."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"localhost:8091":true}\n')),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/worker/v1/tasks")),(0,i.kt)("p",null,"Retrieve a list of active tasks being run on MiddleManager. Returns JSON list of taskid strings. Normal usage should\nprefer to use the ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/tasks")," ",(0,i.kt)("a",{parentName:"p",href:"#overlord"},"Overlord API")," or one of it's task state specific variants instead."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'["index_wikiticker_2019-02-11T02:20:15.316Z"]\n')),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/worker/v1/task/{taskid}/log")),(0,i.kt)("p",null,"Retrieve task log output stream by task id. Normal usage should prefer to use the ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/task/{taskId}/log"),"\n",(0,i.kt)("a",{parentName:"p",href:"#overlord"},"Overlord API")," instead."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/worker/v1/disable")),(0,i.kt)("p",null,"Disable a MiddleManager, causing it to stop accepting new tasks but complete all existing tasks. Returns JSON object\nkeyed by the combined ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.host")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.port"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"localhost:8091":"disabled"}\n')),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/worker/v1/enable")),(0,i.kt)("p",null,"Enable a MiddleManager, allowing it to accept new tasks again if it was previously disabled. Returns JSON object\nkeyed by the combined ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.host")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.port"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"localhost:8091":"enabled"}\n')),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/worker/v1/task/{taskid}/shutdown")),(0,i.kt)("p",null,"Shutdown a running task by ",(0,i.kt)("inlineCode",{parentName:"p"},"taskid"),". Normal usage should prefer to use the ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/indexer/v1/task/{taskId}/shutdown"),"\n",(0,i.kt)("a",{parentName:"p",href:"#overlord"},"Overlord API")," instead. Returns JSON:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"task":"index_kafka_wikiticker_f7011f8ffba384b_fpeclode"}\n')),(0,i.kt)("h3",{id:"peon"},"Peon"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/worker/v1/chat/{taskId}/rowStats")),(0,i.kt)("p",null,"Retrieve a live row stats report from a Peon. See ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/ingestion/tasks#task-reports"},"task reports")," for more details."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/worker/v1/chat/{taskId}/unparseableEvents")),(0,i.kt)("p",null,"Retrieve an unparseable events report from a Peon. See ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/ingestion/tasks#task-reports"},"task reports")," for more details."),(0,i.kt)("h3",{id:"historical"},"Historical"),(0,i.kt)("h4",{id:"segment-loading-1"},"Segment loading"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/historical/v1/loadstatus")),(0,i.kt)("p",null,"Returns JSON of the form ",(0,i.kt)("inlineCode",{parentName:"p"},'{"cacheInitialized":<value>}'),", where value is either ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"false")," indicating if all\nsegments in the local cache have been loaded. This can be used to know when a Historical process is ready\nto be queried after a restart."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/historical/v1/readiness")),(0,i.kt)("p",null,"Similar to ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/historical/v1/loadstatus"),", but instead of returning JSON with a flag, responses 200 OK if segments\nin the local cache have been loaded, and 503 SERVICE UNAVAILABLE, if they haven't."),(0,i.kt)("h2",{id:"query-server"},"Query server"),(0,i.kt)("p",null,"This section documents the API endpoints for the processes that reside on Query servers (Brokers) in the suggested ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/design/processes#server-types"},"three-server configuration"),"."),(0,i.kt)("h3",{id:"broker"},"Broker"),(0,i.kt)("h4",{id:"datasource-information"},"Datasource information"),(0,i.kt)("p",null,"Note that all ",(0,i.kt)("em",{parentName:"p"},"interval")," URL parameters are ISO 8601 strings delimited by a ",(0,i.kt)("inlineCode",{parentName:"p"},"_")," instead of a ",(0,i.kt)("inlineCode",{parentName:"p"},"/"),"\n(e.g., 2016-06-27_2016-06-28)."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#tables-table"},(0,i.kt)("inlineCode",{parentName:"a"},"INFORMATION_SCHEMA.TABLES")),",\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#columns-table"},(0,i.kt)("inlineCode",{parentName:"a"},"INFORMATION_SCHEMA.COLUMNS")),", and\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#segments-table"},(0,i.kt)("inlineCode",{parentName:"a"},"sys.segments"))," tables.")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources")),(0,i.kt)("p",null,"Returns a list of queryable datasources."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}")),(0,i.kt)("p",null,'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.'),(0,i.kt)("p",null,"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: ",(0,i.kt)("inlineCode",{parentName:"p"},"druid.query.segmentMetadata.defaultHistory")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/dimensions")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"This API is deprecated and will be removed in future releases. Please use ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/segmentmetadataquery"},"SegmentMetadataQuery")," instead\nwhich provides more comprehensive information and supports all dataSource types including streaming dataSources. It's also encouraged to use ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables"},"INFORMATION_SCHEMA tables"),"\nif you're using SQL."),(0,i.kt)("p",{parentName:"blockquote"},"Returns the dimensions of the datasource.")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/metrics")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"This API is deprecated and will be removed in future releases. Please use ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/segmentmetadataquery"},"SegmentMetadataQuery")," instead\nwhich provides more comprehensive information and supports all dataSource types including streaming dataSources. It's also encouraged to use ",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables"},"INFORMATION_SCHEMA tables"),"\nif you're using SQL.")),(0,i.kt)("p",null,"Returns the metrics of the datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/candidates?intervals={comma-separated-intervals}&numCandidates={numCandidates}")),(0,i.kt)("p",null,'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.'),(0,i.kt)("h4",{id:"load-status"},"Load Status"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/broker/v1/loadstatus")),(0,i.kt)("p",null,"Returns a flag indicating if the Broker knows about all segments in the cluster. This can be used to know when a Broker process is ready to be queried after a restart."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/broker/v1/readiness")),(0,i.kt)("p",null,"Similar to ",(0,i.kt)("inlineCode",{parentName:"p"},"/druid/broker/v1/loadstatus"),", but instead of returning a JSON, responses 200 OK if its ready and otherwise 503 SERVICE UNAVAILABLE."),(0,i.kt)("h4",{id:"queries"},"Queries"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/v2/")),(0,i.kt)("p",null,"The endpoint for submitting queries. Accepts an option ",(0,i.kt)("inlineCode",{parentName:"p"},"?pretty")," that pretty prints the results."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"POST /druid/v2/candidates/")),(0,i.kt)("p",null,"Returns segment information lists including server locations for the given query.."),(0,i.kt)("h3",{id:"router"},"Router"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#tables-table"},(0,i.kt)("inlineCode",{parentName:"a"},"INFORMATION_SCHEMA.TABLES")),",\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#columns-table"},(0,i.kt)("inlineCode",{parentName:"a"},"INFORMATION_SCHEMA.COLUMNS")),", and\n",(0,i.kt)("a",{parentName:"p",href:"/docs/26.0.0/querying/sql-metadata-tables#segments-table"},(0,i.kt)("inlineCode",{parentName:"a"},"sys.segments"))," tables.")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources")),(0,i.kt)("p",null,"Returns a list of queryable datasources."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}")),(0,i.kt)("p",null,"Returns the dimensions and metrics of the datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/dimensions")),(0,i.kt)("p",null,"Returns the dimensions of the datasource."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"GET /druid/v2/datasources/{dataSourceName}/metrics")),(0,i.kt)("p",null,"Returns the metrics of the datasource."))}k.isMDXComponent=!0}}]);