blob: db9e87d1fe2390451f12cfdbbbae49fc7aa21226 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>API reference ยท Apache Druid</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="canonical" href="https://druid.apache.org/docs/latest/operations/api-reference.html"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;!--"/><meta name="docsearch:language" content="en"/><meta name="docsearch:version" content="26.0.0" /><meta property="og:title" content="API reference ยท Apache Druid"/><meta property="og:type" content="website"/><meta property="og:url" content="https://druid.apache.org/index.html"/><meta property="og:description" content="&lt;!--"/><meta property="og:image" content="https://druid.apache.org/img/druid_nav.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://druid.apache.org/img/druid_nav.png"/><link rel="shortcut icon" href="/img/favicon.png"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-131010415-1"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-131010415-1');
</script><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"/><link rel="stylesheet" href="/css/code-block-buttons.css"/><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script><script type="text/javascript" src="/js/code-block-buttons.js"></script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/druid_nav.png" alt="Apache Druid"/></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/technology" target="_self">Technology</a></li><li class=""><a href="/use-cases" target="_self">Use Cases</a></li><li class=""><a href="/druid-powered" target="_self">Powered By</a></li><li class="siteNavGroupActive"><a href="/docs/latest/design/index.html" target="_self">Docs</a></li><li class=""><a href="/community/" target="_self">Community</a></li><li class=""><a href="https://www.apache.org" target="_self">Apache</a></li><li class=""><a href="/downloads.html" target="_self">Download</a></li><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>โ€บ</i><span>Operations</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Getting started<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/design/index.html">Introduction to Apache Druid</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/index.html">Quickstart (local)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/single-server.html">Single server deployment</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/cluster.html">Clustered deployment</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Tutorials<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-batch.html">Load files natively</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-msq-extern.html">Load files using SQL ๐Ÿ†•</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-kafka.html">Load from Apache Kafka</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-batch-hadoop.html">Load from Apache Hadoop</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-query.html">Querying data</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-rollup.html">Roll-up</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-sketches-theta.html">Theta sketches</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-retention.html">Configuring data retention</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-update-data.html">Updating existing data</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-compaction.html">Compacting segments</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-delete-data.html">Deleting data</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-ingestion-spec.html">Writing an ingestion spec</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-transform-spec.html">Transforming input data</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/docker.html">Tutorial: Run with Docker</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-kerberos-hadoop.html">Kerberized HDFS deep storage</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-msq-convert-spec.html">Convert ingestion spec to SQL</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-sql-query-view.html">Get to know Query view</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-unnest-arrays.html">Unnesting arrays</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-jupyter-index.html">Jupyter Notebook tutorials</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-jupyter-docker.html">Docker for tutorials</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/tutorials/tutorial-jdbc.html">JDBC connector</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Design<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/design/architecture.html">Design</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/segments.html">Segments</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/processes.html">Processes and servers</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/dependencies/deep-storage.html">Deep storage</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/dependencies/metadata-storage.html">Metadata storage</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/dependencies/zookeeper.html">ZooKeeper</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Ingestion<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/index.html">Ingestion</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/data-formats.html">Data formats</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/data-model.html">Data model</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/rollup.html">Data rollup</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/partitioning.html">Partitioning</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/ingestion-spec.html">Ingestion spec</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/schema-design.html">Schema design tips</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Stream ingestion</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/kafka-ingestion.html">Apache Kafka ingestion</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/kafka-supervisor-reference.html">Apache Kafka supervisor</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/kafka-supervisor-operations.html">Apache Kafka operations</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/kinesis-ingestion.html">Amazon Kinesis</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Batch ingestion</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/native-batch.html">Native batch</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/native-batch-input-sources.html">Native batch: input sources</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/migrate-from-firehose.html">Migrate from firehose</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/hadoop.html">Hadoop-based</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">SQL-based ingestion ๐Ÿ†•</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/index.html">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/concepts.html">Key concepts</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/api.html">API</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/security.html">Security</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/examples.html">Examples</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/reference.html">Reference</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/multi-stage-query/known-issues.html">Known issues</a></li></ul></div><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/tasks.html">Task reference</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/faq.html">Troubleshooting FAQ</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Data management<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/data-management/index.html">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/data-management/update.html">Data updates</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/data-management/delete.html">Data deletion</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/data-management/schema-changes.html">Schema changes</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/data-management/compaction.html">Compaction</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/data-management/automatic-compaction.html">Automatic compaction</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Querying<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Druid SQL</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql.html">Overview and syntax</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-data-types.html">SQL data types</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-operators.html">Operators</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-scalar.html">Scalar functions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-aggregations.html">Aggregation functions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-multivalue-string-functions.html">Multi-value string functions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-json-functions.html">JSON functions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-functions.html">All functions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-api.html">Druid SQL API</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-jdbc.html">JDBC driver API</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-query-context.html">SQL query context</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-metadata-tables.html">SQL metadata tables</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sql-translation.html">SQL query translation</a></li></ul></div><li class="navListItem"><a class="navItem" href="/docs/latest/querying/querying.html">Native queries</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/query-execution.html">Query execution</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/troubleshooting.html">Troubleshooting</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Concepts</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/querying/datasource.html">Datasources</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/joins.html">Joins</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/lookups.html">Lookups</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/multi-value-dimensions.html">Multi-value dimensions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/nested-columns.html">Nested columns</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/multitenancy.html">Multitenancy</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/caching.html">Query caching</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/using-caching.html">Using query caching</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/query-context.html">Query context</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Native query types</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/querying/timeseriesquery.html">Timeseries</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/topnquery.html">TopN</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/groupbyquery.html">GroupBy</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/scan-query.html">Scan</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/searchquery.html">Search</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/timeboundaryquery.html">TimeBoundary</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/segmentmetadataquery.html">SegmentMetadata</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/datasourcemetadataquery.html">DatasourceMetadata</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Native query components</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/querying/filters.html">Filters</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/granularities.html">Granularities</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/dimensionspecs.html">Dimensions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/aggregations.html">Aggregations</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/post-aggregations.html">Post-aggregations</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/misc/math-expr.html">Expressions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/having.html">Having filters (groupBy)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/limitspec.html">Sorting and limiting (groupBy)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/topnmetricspec.html">Sorting (topN)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/sorting-orders.html">String comparators</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/virtual-columns.html">Virtual columns</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/geo.html">Spatial filters</a></li></ul></div></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Configuration<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/configuration/index.html">Configuration reference</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions.html">Extensions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/configuration/logging.html">Logging</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Operations<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/operations/web-console.html">Web console</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/java.html">Java runtime</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Security</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/operations/security-overview.html">Security overview</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/security-user-auth.html">User authentication and authorization</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/auth-ldap.html">LDAP auth</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/password-provider.html">Password providers</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/dynamic-config-provider.html">Dynamic Config Providers</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/tls-support.html">TLS support</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Performance tuning</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/operations/basic-cluster-tuning.html">Basic cluster tuning</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/segment-optimization.html">Segment size optimization</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/mixed-workloads.html">Mixed workloads</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/http-compression.html">HTTP compression</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/clean-metadata-store.html">Automated metadata cleanup</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Monitoring</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/operations/request-logging.html">Request logging</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/metrics.html">Metrics</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/alerts.html">Alerts</a></li></ul></div><li class="navListItem navListItemActive"><a class="navItem" href="/docs/latest/operations/api-reference.html">API reference</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/high-availability.html">High availability</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/rolling-updates.html">Rolling updates</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/rule-configuration.html">Using rules to drop and retain data</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/other-hadoop.html">Working with different versions of Apache Hadoop</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Misc</h4><ul><li class="navListItem"><a class="navItem" href="/docs/latest/operations/dump-segment.html">dump-segment tool</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/reset-cluster.html">reset-cluster tool</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/insert-segment-to-db.html">insert-segment-to-db tool</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/pull-deps.html">pull-deps tool</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/deep-storage-migration.html">Deep storage migration</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/export-metadata.html">Export Metadata Tool</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/metadata-migration.html">Metadata Migration</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/use_sbt_to_build_fat_jar.html">Content for build.sbt</a></li></ul></div></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Development<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/development/overview.html">Developing on Druid</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/modules.html">Creating extensions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/javascript.html">JavaScript functionality</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/build.html">Build from source</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/versioning.html">Versioning</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/experimental.html">Experimental features</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Misc<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/misc/papers-and-talks.html">Papers</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Hidden<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/latest/comparisons/druid-vs-elasticsearch.html">Apache Druid vs Elasticsearch</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/comparisons/druid-vs-key-value.html">Apache Druid vs. Key/Value Stores (HBase/Cassandra/OpenTSDB)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/comparisons/druid-vs-kudu.html">Apache Druid vs Kudu</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/comparisons/druid-vs-redshift.html">Apache Druid vs Redshift</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/comparisons/druid-vs-spark.html">Apache Druid vs Spark</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/comparisons/druid-vs-sql-on-hadoop.html">Apache Druid vs SQL-on-Hadoop</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/auth.html">Authentication and Authorization</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/broker.html">Broker</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/coordinator.html">Coordinator Process</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/historical.html">Historical Process</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/indexer.html">Indexer Process</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/indexing-service.html">Indexing Service</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/middlemanager.html">MiddleManager Process</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/overlord.html">Overlord Process</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/router.html">Router Process</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/design/peons.html">Peons</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/approximate-histograms.html">Approximate Histogram aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/avro.html">Apache Avro</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/azure.html">Microsoft Azure</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/bloom-filter.html">Bloom Filter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/datasketches-extension.html">DataSketches extension</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/datasketches-hll.html">DataSketches HLL Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/datasketches-quantiles.html">DataSketches Quantiles Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/datasketches-theta.html">DataSketches Theta Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/datasketches-tuple.html">DataSketches Tuple Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/druid-basic-security.html">Basic Security</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/druid-kerberos.html">Kerberos</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/druid-lookups.html">Cached Lookup Module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/druid-ranger-security.html">Apache Ranger Security</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/google.html">Google Cloud Storage</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/hdfs.html">HDFS</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/kafka-extraction-namespace.html">Apache Kafka Lookups</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/lookups-cached-global.html">Globally Cached Lookups</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/mysql.html">MySQL Metadata Store</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/orc.html">ORC Extension</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/druid-pac4j.html">Druid pac4j based Security extension</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/parquet.html">Apache Parquet Extension</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/postgresql.html">PostgreSQL Metadata Store</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/protobuf.html">Protobuf</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/s3.html">S3-compatible</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/simple-client-sslcontext.html">Simple SSLContext Provider Module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/stats.html">Stats aggregator</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/test-stats.html">Test Stats Aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/druid-aws-rds.html">Druid AWS RDS Module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-core/kubernetes.html">Kubernetes</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/ambari-metrics-emitter.html">Ambari Metrics Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/cassandra.html">Apache Cassandra</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/cloudfiles.html">Rackspace Cloud Files</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/distinctcount.html">DistinctCount Aggregator</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/graphite.html">Graphite Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/influx.html">InfluxDB Line Protocol Parser</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/influxdb-emitter.html">InfluxDB Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/kafka-emitter.html">Kafka Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/materialized-view.html">Materialized View</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/momentsketch-quantiles.html">Moment Sketches for Approximate Quantiles module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/moving-average-query.html">Moving Average Query</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/opentsdb-emitter.html">OpenTSDB Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/redis-cache.html">Druid Redis Cache</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/sqlserver.html">Microsoft SQLServer</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/statsd.html">StatsD Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/tdigestsketch-quantiles.html">T-Digest Quantiles Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/thrift.html">Thrift</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/time-min-max.html">Timestamp Min/Max aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/gce-extensions.html">GCE Extensions</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/aliyun-oss.html">Aliyun OSS</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/development/extensions-contrib/prometheus.html">Prometheus Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/operations/kubernetes.html">kubernetes</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/hll-old.html">Cardinality/HyperUnique aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/querying/select-query.html">Select</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/native-batch-firehose.html">Firehose (deprecated)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/native-batch-simple-task.html">Native batch (simple)</a></li><li class="navListItem"><a class="navItem" href="/docs/latest/ingestion/standalone-realtime.html">Realtime Process</a></li></ul></div></div></section></div><script>
var coll = document.getElementsByClassName('collapsible');
var checkActiveCategory = true;
for (var i = 0; i < coll.length; i++) {
var links = coll[i].nextElementSibling.getElementsByTagName('*');
if (checkActiveCategory){
for (var j = 0; j < links.length; j++) {
if (links[j].classList.contains('navListItemActive')){
coll[i].nextElementSibling.classList.toggle('hide');
coll[i].childNodes[1].classList.toggle('rotate');
checkActiveCategory = false;
break;
}
}
}
coll[i].addEventListener('click', function() {
var arrow = this.childNodes[1];
arrow.classList.toggle('rotate');
var content = this.nextElementSibling;
content.classList.toggle('hide');
});
}
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
var headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
var el = event.target;
while(el !== headings){
if (el.tagName === 'A') {
document.body.classList.remove('tocActive');
break;
} else{
el = el.parentNode;
}
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer docsContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/apache/druid/edit/master/docs/operations/api-reference.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">API reference</h1></header><article><div><span><!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<p>This page documents all of the API endpoints for each Druid service type.</p>
<h2><a class="anchor" aria-hidden="true" id="common"></a><a href="#common" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Common</h2>
<p>The following endpoints are supported by all processes.</p>
<h3><a class="anchor" aria-hidden="true" id="process-information"></a><a href="#process-information" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Process information</h3>
<p><code>GET /status</code></p>
<p>Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the process.</p>
<p><code>GET /status/health</code></p>
<p>An endpoint that always returns a boolean &quot;true&quot; value with a 200 OK response, useful for automated health checks.</p>
<p><code>GET /status/properties</code></p>
<p>Returns the current configuration properties of the process.</p>
<p><code>GET /status/selfDiscovered/status</code></p>
<p>Returns a JSON map of the form <code>{&quot;selfDiscovered&quot;: true/false}</code>, indicating whether the node has received a confirmation
from the central node discovery mechanism (currently ZooKeeper) of the Druid cluster that the node has been added to the
cluster. It is recommended to not consider a Druid node &quot;healthy&quot; or &quot;ready&quot; in automated deployment/container
management systems until it returns <code>{&quot;selfDiscovered&quot;: true}</code> from this endpoint. This is because a node may be
isolated from the rest of the cluster due to network issues and it doesn't make sense to consider nodes &quot;healthy&quot; in
this case. Also, when nodes such as Brokers use ZooKeeper segment discovery for building their view of the Druid cluster
(as opposed to HTTP segment discovery), they may be unusable until the ZooKeeper client is fully initialized and starts
to receive data from the ZooKeeper cluster. <code>{&quot;selfDiscovered&quot;: true}</code> is a proxy event indicating that the ZooKeeper
client on the node has started to receive data from the ZooKeeper cluster and it's expected that all segments and other
nodes will be discovered by this node timely from this point.</p>
<p><code>GET /status/selfDiscovered</code></p>
<p>Similar to <code>/status/selfDiscovered/status</code>, but returns 200 OK response with empty body if the node has discovered itself
and 503 SERVICE UNAVAILABLE if the node hasn't discovered itself yet. This endpoint might be useful because some
monitoring checks such as AWS load balancer health checks are not able to look at the response body.</p>
<h2><a class="anchor" aria-hidden="true" id="master-server"></a><a href="#master-server" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Master server</h2>
<p>This section documents the API endpoints for the processes that reside on Master servers (Coordinators and Overlords)
in the suggested <a href="/docs/latest/design/processes.html#server-types">three-server configuration</a>.</p>
<h3><a class="anchor" aria-hidden="true" id="coordinator"></a><a href="#coordinator" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Coordinator</h3>
<h4><a class="anchor" aria-hidden="true" id="leadership"></a><a href="#leadership" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Leadership</h4>
<p><code>GET /druid/coordinator/v1/leader</code></p>
<p>Returns the current leader Coordinator of the cluster.</p>
<p><code>GET /druid/coordinator/v1/isLeader</code></p>
<p>Returns a JSON object with field &quot;leader&quot;, 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.</p>
<p><a name="coordinator-segment-loading"></a></p>
<h4><a class="anchor" aria-hidden="true" id="segment-loading"></a><a href="#segment-loading" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Segment loading</h4>
<p><code>GET /druid/coordinator/v1/loadstatus</code></p>
<p>Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster.</p>
<p><code>GET /druid/coordinator/v1/loadstatus?simple</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/loadstatus?full</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/loadstatus?full&amp;computeUsingClusterView</code></p>
<p>Returns the number of segments not yet loaded for each tier until all segments loading in the cluster are available.
The 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.
A segment is considered fully loaded when:</p>
<ul>
<li>Druid has replicated it the number of times configured in the corresponding load rule.</li>
<li>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.</li>
</ul>
<p><code>GET /druid/coordinator/v1/loadqueue</code></p>
<p>Returns the ids of segments to load and drop for each Historical process.</p>
<p><code>GET /druid/coordinator/v1/loadqueue?simple</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/loadqueue?full</code></p>
<p>Returns the serialized JSON of segments to load and drop for each Historical process.</p>
<h4><a class="anchor" aria-hidden="true" id="segment-loading-by-datasource"></a><a href="#segment-loading-by-datasource" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Segment loading by datasource</h4>
<p>Note that all <em>interval</em> query parameters are ISO 8601 strings (e.g., 2016-06-27/2016-06-28).
Also note that these APIs only guarantees that the segments are available at the time of the call.
Segments can still become missing because of historical process failures or any other reasons afterward.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?forceMetadataRefresh={boolean}&amp;interval={myInterval}</code></p>
<p>Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster for the given
datasource over the given interval (or last 2 weeks if interval is not given). <code>forceMetadataRefresh</code> is required to be set.</p>
<ul>
<li>Setting <code>forceMetadataRefresh</code> to true will force the coordinator to poll latest segment metadata from the metadata store
(Note: <code>forceMetadataRefresh=true</code> refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms
of the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)</li>
<li>Setting <code>forceMetadataRefresh</code> to false will use the metadata cached on the coordinator from the last force/periodic refresh.
If no used segments are found for the given inputs, this API returns <code>204 No Content</code></li>
</ul>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?simple&amp;forceMetadataRefresh={boolean}&amp;interval={myInterval}</code></p>
<p>Returns the number of segments left to load until segments that should be loaded in the cluster are available for the given datasource
over the given interval (or last 2 weeks if interval is not given). This does not include segment replication counts. <code>forceMetadataRefresh</code> is required to be set.</p>
<ul>
<li>Setting <code>forceMetadataRefresh</code> to true will force the coordinator to poll latest segment metadata from the metadata store
(Note: <code>forceMetadataRefresh=true</code> refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms
of the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)</li>
<li>Setting <code>forceMetadataRefresh</code> to false will use the metadata cached on the coordinator from the last force/periodic refresh.
If no used segments are found for the given inputs, this API returns <code>204 No Content</code></li>
</ul>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?full&amp;forceMetadataRefresh={boolean}&amp;interval={myInterval}</code></p>
<p>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. <code>forceMetadataRefresh</code> is required to be set.</p>
<ul>
<li>Setting <code>forceMetadataRefresh</code> to true will force the coordinator to poll latest segment metadata from the metadata store
(Note: <code>forceMetadataRefresh=true</code> refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms
of the load on the metadata store but can be necessary to make sure that we verify all the latest segments' load status)</li>
<li>Setting <code>forceMetadataRefresh</code> to false will use the metadata cached on the coordinator from the last force/periodic refresh.</li>
</ul>
<p>You can pass the optional query parameter <code>computeUsingClusterView</code> to factor in the available cluster services when calculating
the segments left to load. See <a href="#coordinator-segment-loading">Coordinator Segment Loading</a> for details.
If no used segments are found for the given inputs, this API returns <code>204 No Content</code></p>
<h4><a class="anchor" aria-hidden="true" id="metadata-store-information"></a><a href="#metadata-store-information" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Metadata store information</h4>
<blockquote>
<p>Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL
<a href="/docs/latest/querying/sql-metadata-tables.html#segments-table"><code>sys.segments</code></a> table.</p>
</blockquote>
<p><code>GET /druid/coordinator/v1/metadata/segments</code></p>
<p>Returns a list of all segments for each datasource enabled in the cluster.</p>
<p><code>GET /druid/coordinator/v1/metadata/segments?datasources={dataSourceName1}&amp;datasources={dataSourceName2}</code></p>
<p>Returns a list of all segments for one or more specific datasources enabled in the cluster.</p>
<p><code>GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus</code></p>
<p>Returns a list of all segments for each datasource with the full segment metadata and an extra field <code>overshadowed</code>.</p>
<p><code>GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&amp;datasources={dataSourceName1}&amp;datasources={dataSourceName2}</code></p>
<p>Returns a list of all segments for one or more specific datasources with the full segment metadata and an extra field <code>overshadowed</code>.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources?includeUnused</code></p>
<p>Returns a list of the names of datasources, regardless of whether there are used segments belonging to those datasources in the cluster or not.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources?includeDisabled</code></p>
<p>Returns a list of the names of datasources, regardless of whether the datasource is disabled or not.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources?full</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}</code></p>
<p>Returns full metadata for a datasource as stored in the metadata store.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments</code></p>
<p>Returns a list of all segments for a datasource as stored in the metadata store.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full</code></p>
<p>Returns a list of all segments for a datasource with the full segment metadata as stored in the metadata store.</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}</code></p>
<p>Returns full segment metadata for a specific segment as stored in the metadata store, if the segment is used. If the
segment is unused, or is unknown, a 404 response is returned.</p>
<h5><a class="anchor" aria-hidden="true" id="post"></a><a href="#post" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>POST</h5>
<p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments</code></p>
<p>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 [&quot;2012-01-01T00:00:00.000/2012-01-03T00:00:00.000&quot;, &quot;2012-01-05T00:00:00.000/2012-01-07T00:00:00.000&quot;]</p>
<p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full</code></p>
<p>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 [&quot;2012-01-01T00:00:00.000/2012-01-03T00:00:00.000&quot;, &quot;2012-01-05T00:00:00.000/2012-01-07T00:00:00.000&quot;]</p>
<p><a name="coordinator-datasources"></a></p>
<h4><a class="anchor" aria-hidden="true" id="datasources"></a><a href="#datasources" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Datasources</h4>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<p><code>GET /druid/coordinator/v1/datasources</code></p>
<p>Returns a list of datasource names found in the cluster as seen by the coordinator. This view is updated every <a href="/docs/latest/configuration/index.html#coordinator-operation"><code>druid.coordinator.period</code></a>.</p>
<p><code>GET /druid/coordinator/v1/datasources?simple</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/datasources?full</code></p>
<p>Returns a list of datasource names found in the cluster with all metadata about those datasources.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}?full</code></p>
<p>Returns full metadata for a datasource .</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals</code></p>
<p>Returns a set of segment intervals.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?simple</code></p>
<p>Returns a map of an interval to a JSON object containing the total byte size of segments and number of segments for that interval.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?full</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}</code></p>
<p>Returns a set of segment ids for an interval.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simple</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?full</code></p>
<p>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.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}/serverview</code></p>
<p>Returns a map of segment intervals contained within the specified interval to information about the servers that contain the segment for an interval.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/segments</code></p>
<p>Returns a list of all segments for a datasource in the cluster.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/segments?full</code></p>
<p>Returns a list of all segments for a datasource in the cluster with the full segment metadata.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}</code></p>
<p>Returns full segment metadata for a specific segment in the cluster.</p>
<p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/tiers</code></p>
<p>Return the tiers that a datasource exists in.</p>
<h4><a class="anchor" aria-hidden="true" id="note-for-coordinators-post-and-delete-apis"></a><a href="#note-for-coordinators-post-and-delete-apis" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Note for coordinator's POST and DELETE API's</h4>
<p>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.</p>
<blockquote>
<p>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)</p>
</blockquote>
<p><code>POST /druid/coordinator/v1/datasources/{dataSourceName}</code></p>
<p>Marks as used all segments belonging to a datasource. Returns a JSON object of the form
<code>{&quot;numChangedSegments&quot;: &lt;number&gt;}</code> with the number of segments in the database whose state has been changed (that is,
the segments were marked as used) as the result of this API call.</p>
<p><code>POST /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}</code></p>
<p>Marks as used a segment of a datasource. Returns a JSON object of the form <code>{&quot;segmentStateChanged&quot;: &lt;boolean&gt;}</code> with
the boolean indicating if the state of the segment has been changed (that is, the segment was marked as used) as the
result of this API call.</p>
<p><code>POST /druid/coordinator/v1/datasources/{dataSourceName}/markUsed</code></p>
<p><code>POST /druid/coordinator/v1/datasources/{dataSourceName}/markUnused</code></p>
<p>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.</p>
<p>The request payload contains the interval or set of segment Ids to be marked unused.
Either 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).</p>
<p>Interval specifies the start and end times as IS0 8601 strings. <code>interval=(start/end)</code> 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.</p>
<p>JSON Request Payload:</p>
<table>
<thead>
<tr><th>Key</th><th>Description</th><th>Example</th></tr>
</thead>
<tbody>
<tr><td><code>interval</code></td><td>The interval for which to mark segments unused</td><td>&quot;2015-09-12T03:00:00.000Z/2015-09-12T05:00:00.000Z&quot;</td></tr>
<tr><td><code>segmentIds</code></td><td>Set of segment Ids to be marked unused</td><td>[&quot;segmentId1&quot;, &quot;segmentId2&quot;]</td></tr>
</tbody>
</table>
<p><code>DELETE /druid/coordinator/v1/datasources/{dataSourceName}</code></p>
<p>Marks as unused all segments belonging to a datasource. Returns a JSON object of the form
<code>{&quot;numChangedSegments&quot;: &lt;number&gt;}</code> with the number of segments in the database whose state has been changed (that is,
the segments were marked as unused) as the result of this API call.</p>
<p><code>DELETE /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}</code>
<code>@Deprecated. /druid/coordinator/v1/datasources/{dataSourceName}?kill=true&amp;interval={myInterval}</code></p>
<p>Runs a <a href="/docs/latest/ingestion/tasks.html">Kill task</a> for a given interval and datasource.</p>
<p><code>DELETE /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}</code></p>
<p>Marks as unused a segment of a datasource. Returns a JSON object of the form <code>{&quot;segmentStateChanged&quot;: &lt;boolean&gt;}</code> with
the boolean indicating if the state of the segment has been changed (that is, the segment was marked as unused) as the
result of this API call.</p>
<h4><a class="anchor" aria-hidden="true" id="retention-rules"></a><a href="#retention-rules" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Retention rules</h4>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<p><code>GET /druid/coordinator/v1/rules</code></p>
<p>Returns all rules as JSON objects for all datasources in the cluster including the default datasource.</p>
<p><code>GET /druid/coordinator/v1/rules/{dataSourceName}</code></p>
<p>Returns all rules for a specified datasource.</p>
<p><code>GET /druid/coordinator/v1/rules/{dataSourceName}?full</code></p>
<p>Returns all rules for a specified datasource and includes default datasource.</p>
<p><code>GET /druid/coordinator/v1/rules/history?interval=&lt;interval&gt;</code></p>
<p>Returns audit history of rules for all datasources. default value of interval can be specified by setting <code>druid.audit.manager.auditHistoryMillis</code> (1 week if not configured) in Coordinator runtime.properties</p>
<p><code>GET /druid/coordinator/v1/rules/history?count=&lt;n&gt;</code></p>
<p>Returns last <code>n</code> entries of audit history of rules for all datasources.</p>
<p><code>GET /druid/coordinator/v1/rules/{dataSourceName}/history?interval=&lt;interval&gt;</code></p>
<p>Returns audit history of rules for a specified datasource. default value of interval can be specified by setting <code>druid.audit.manager.auditHistoryMillis</code> (1 week if not configured) in Coordinator runtime.properties</p>
<p><code>GET /druid/coordinator/v1/rules/{dataSourceName}/history?count=&lt;n&gt;</code></p>
<p>Returns last <code>n</code> entries of audit history of rules for a specified datasource.</p>
<p><code>POST /druid/coordinator/v1/rules/{dataSourceName}</code></p>
<p>POST with a list of rules in JSON form to update rules.</p>
<p>Optional Header Parameters for auditing the config change can also be specified.</p>
<table>
<thead>
<tr><th>Header Param Name</th><th>Description</th><th>Default</th></tr>
</thead>
<tbody>
<tr><td><code>X-Druid-Author</code></td><td>author making the config change</td><td>&quot;&quot;</td></tr>
<tr><td><code>X-Druid-Comment</code></td><td>comment describing the change being done</td><td>&quot;&quot;</td></tr>
</tbody>
</table>
<h4><a class="anchor" aria-hidden="true" id="intervals"></a><a href="#intervals" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Intervals</h4>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<p><code>GET /druid/coordinator/v1/intervals</code></p>
<p>Returns all intervals for all datasources with total size and count.</p>
<p><code>GET /druid/coordinator/v1/intervals/{interval}</code></p>
<p>Returns aggregated total size and count for all intervals that intersect given isointerval.</p>
<p><code>GET /druid/coordinator/v1/intervals/{interval}?simple</code></p>
<p>Returns total size and count for each interval within given isointerval.</p>
<p><code>GET /druid/coordinator/v1/intervals/{interval}?full</code></p>
<p>Returns total size and count for each datasource for each interval within given isointerval.</p>
<h4><a class="anchor" aria-hidden="true" id="dynamic-configuration"></a><a href="#dynamic-configuration" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Dynamic configuration</h4>
<p>See <a href="/docs/latest/configuration/index.html#dynamic-configuration">Coordinator Dynamic Configuration</a> for details.</p>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<p><code>GET /druid/coordinator/v1/config</code></p>
<p>Retrieves current coordinator dynamic configuration.</p>
<p><code>GET /druid/coordinator/v1/config/history?interval={interval}&amp;count={count}</code></p>
<p>Retrieves history of changes to overlord dynamic configuration. Accepts <code>interval</code> and <code>count</code> query string parameters
to filter by interval and limit the number of results respectively.</p>
<p><code>POST /druid/coordinator/v1/config</code></p>
<p>Update overlord dynamic worker configuration.</p>
<h4><a class="anchor" aria-hidden="true" id="automatic-compaction-status"></a><a href="#automatic-compaction-status" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Automatic compaction status</h4>
<p><code>GET /druid/coordinator/v1/compaction/progress?dataSource={dataSource}</code></p>
<p>Returns the total size of segments awaiting compaction for the given dataSource. The specified dataSource must have <a href="/docs/latest/data-management/automatic-compaction.html">automatic compaction</a> enabled.</p>
<p><code>GET /druid/coordinator/v1/compaction/status</code></p>
<p>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 <code>latestStatus</code> objects. Each <code>latestStatus</code> represents the status for a dataSource (which has/had auto-compaction enabled).
The <code>latestStatus</code> object has the following keys:</p>
<ul>
<li><code>dataSource</code>: name of the datasource for this status information</li>
<li><code>scheduleStatus</code>: auto-compaction scheduling status. Possible values are <code>NOT_ENABLED</code> and <code>RUNNING</code>. Returns <code>RUNNING</code> if the dataSource has an active auto-compaction config submitted. Otherwise, returns <code>NOT_ENABLED</code>.</li>
<li><code>bytesAwaitingCompaction</code>: total bytes of this datasource waiting to be compacted by the auto-compaction (only consider intervals/segments that are eligible for auto-compaction)</li>
<li><code>bytesCompacted</code>: total bytes of this datasource that are already compacted with the spec set in the auto-compaction config</li>
<li><code>bytesSkipped</code>: total bytes of this datasource that are skipped (not eligible for auto-compaction) by the auto-compaction</li>
<li><code>segmentCountAwaitingCompaction</code>: 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)</li>
<li><code>segmentCountCompacted</code>: total number of segments of this datasource that are already compacted with the spec set in the auto-compaction config</li>
<li><code>segmentCountSkipped</code>: total number of segments of this datasource that are skipped (not eligible for auto-compaction) by the auto-compaction</li>
<li><code>intervalCountAwaitingCompaction</code>: 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)</li>
<li><code>intervalCountCompacted</code>: total number of intervals of this datasource that are already compacted with the spec set in the auto-compaction config</li>
<li><code>intervalCountSkipped</code>: total number of intervals of this datasource that are skipped (not eligible for auto-compaction) by the auto-compaction</li>
</ul>
<p><code>GET /druid/coordinator/v1/compaction/status?dataSource={dataSource}</code></p>
<p>Similar to the API <code>/druid/coordinator/v1/compaction/status</code> above but filters response to only return information for the {dataSource} given.
Note that {dataSource} given must have/had auto-compaction enabled.</p>
<h4><a class="anchor" aria-hidden="true" id="automatic-compaction-configuration"></a><a href="#automatic-compaction-configuration" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Automatic compaction configuration</h4>
<p><code>GET /druid/coordinator/v1/config/compaction</code></p>
<p>Returns all automatic compaction configs.</p>
<p><code>GET /druid/coordinator/v1/config/compaction/{dataSource}</code></p>
<p>Returns an automatic compaction config of a dataSource.</p>
<p><code>GET /druid/coordinator/v1/config/compaction/{dataSource}/history?interval={interval}&amp;count={count}</code></p>
<p>Returns the history of the automatic compaction config for a dataSource. Optionally accepts <code>interval</code> and <code>count</code>
query string parameters to filter by interval and limit the number of results respectively. If the dataSource does not
exist or there is no compaction history for the dataSource, an empty list is returned.</p>
<p>The response contains a list of objects with the following keys:</p>
<ul>
<li><code>globalConfig</code>: A json object containing automatic compaction config that applies to the entire cluster.</li>
<li><code>compactionConfig</code>: A json object containing the automatic compaction config for the datasource.</li>
<li><code>auditInfo</code>: A json object that contains information about the change made - like <code>author</code>, <code>comment</code> and <code>ip</code>.</li>
<li><code>auditTime</code>: The date and time when the change was made.</li>
</ul>
<p><code>POST /druid/coordinator/v1/config/compaction/taskslots?ratio={someRatio}&amp;max={someMaxSlots}</code></p>
<p>Update the capacity for compaction tasks. <code>ratio</code> and <code>max</code> are used to limit the max number of compaction tasks.
They 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 <code>min(max, ratio * total task slots)</code>.
Note that <code>ratio</code> and <code>max</code> are optional and can be omitted. If they are omitted, default values (0.1 and unbounded)
will be set for them.</p>
<p><code>POST /druid/coordinator/v1/config/compaction</code></p>
<p>Creates or updates the <a href="/docs/latest/data-management/automatic-compaction.html">automatic compaction</a> config for a dataSource. See <a href="/docs/latest/configuration/index.html#automatic-compaction-dynamic-configuration">Automatic compaction dynamic configuration</a> for configuration details.</p>
<p><code>DELETE /druid/coordinator/v1/config/compaction/{dataSource}</code></p>
<p>Removes the automatic compaction config for a dataSource.</p>
<h4><a class="anchor" aria-hidden="true" id="server-information"></a><a href="#server-information" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Server information</h4>
<p><code>GET /druid/coordinator/v1/servers</code></p>
<p>Returns a list of servers URLs using the format <code>{hostname}:{port}</code>. Note that
processes that run with different types will appear multiple times with different
ports.</p>
<p><code>GET /druid/coordinator/v1/servers?simple</code></p>
<p>Returns a list of server data objects in which each object has the following keys:</p>
<ul>
<li><code>host</code>: host URL include (<code>{hostname}:{port}</code>)</li>
<li><code>type</code>: process type (<code>indexer-executor</code>, <code>historical</code>)</li>
<li><code>currSize</code>: storage size currently used</li>
<li><code>maxSize</code>: maximum storage size</li>
<li><code>priority</code></li>
<li><code>tier</code></li>
</ul>
<h3><a class="anchor" aria-hidden="true" id="overlord"></a><a href="#overlord" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Overlord</h3>
<h4><a class="anchor" aria-hidden="true" id="leadership-1"></a><a href="#leadership-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Leadership</h4>
<p><code>GET /druid/indexer/v1/leader</code></p>
<p>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.</p>
<p><code>GET /druid/indexer/v1/isLeader</code></p>
<p>This returns a JSON object with field &quot;leader&quot;, 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.</p>
<h4><a class="anchor" aria-hidden="true" id="tasks"></a><a href="#tasks" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Tasks</h4>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<p><code>GET /druid/indexer/v1/tasks</code></p>
<p>Retrieve list of tasks. Accepts query string parameters <code>state</code>, <code>datasource</code>, <code>createdTimeInterval</code>, <code>max</code>, and <code>type</code>.</p>
<table>
<thead>
<tr><th>Query Parameter</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td><code>state</code></td><td>filter list of tasks by task state, valid options are <code>running</code>, <code>complete</code>, <code>waiting</code>, and <code>pending</code>.</td></tr>
<tr><td><code>datasource</code></td><td>return tasks filtered by Druid datasource.</td></tr>
<tr><td><code>createdTimeInterval</code></td><td>return tasks created within the specified interval.</td></tr>
<tr><td><code>max</code></td><td>maximum number of <code>&quot;complete&quot;</code> tasks to return. Only applies when <code>state</code> is set to <code>&quot;complete&quot;</code>.</td></tr>
<tr><td><code>type</code></td><td>filter tasks by task type. See <a href="/docs/latest/ingestion/tasks.html">task documentation</a> for more details.</td></tr>
</tbody>
</table>
<p><code>GET /druid/indexer/v1/completeTasks</code></p>
<p>Retrieve list of complete tasks. Equivalent to <code>/druid/indexer/v1/tasks?state=complete</code>.</p>
<p><code>GET /druid/indexer/v1/runningTasks</code></p>
<p>Retrieve list of running tasks. Equivalent to <code>/druid/indexer/v1/tasks?state=running</code>.</p>
<p><code>GET /druid/indexer/v1/waitingTasks</code></p>
<p>Retrieve list of waiting tasks. Equivalent to <code>/druid/indexer/v1/tasks?state=waiting</code>.</p>
<p><code>GET /druid/indexer/v1/pendingTasks</code></p>
<p>Retrieve list of pending tasks. Equivalent to <code>/druid/indexer/v1/tasks?state=pending</code>.</p>
<p><code>GET /druid/indexer/v1/task/{taskId}</code></p>
<p>Retrieve the 'payload' of a task.</p>
<p><code>GET /druid/indexer/v1/task/{taskId}/status</code></p>
<p>Retrieve the status of a task.</p>
<p><code>GET /druid/indexer/v1/task/{taskId}/segments</code></p>
<blockquote>
<p>This API is deprecated and will be removed in future releases.</p>
</blockquote>
<p>Retrieve information about the segments of a task.</p>
<p><code>GET /druid/indexer/v1/task/{taskId}/reports</code></p>
<p>Retrieve a <a href="/docs/latest/ingestion/tasks.html#task-reports">task completion report</a> for a task. Only works for completed tasks.</p>
<p><code>POST /druid/indexer/v1/task</code></p>
<p>Endpoint for submitting tasks and supervisor specs to the Overlord. Returns the taskId of the submitted task.</p>
<p><code>POST /druid/indexer/v1/task/{taskId}/shutdown</code></p>
<p>Shuts down a task.</p>
<p><code>POST /druid/indexer/v1/datasources/{dataSource}/shutdownAllTasks</code></p>
<p>Shuts down all tasks for a dataSource.</p>
<p><code>POST /druid/indexer/v1/taskStatus</code></p>
<p>Retrieve list of task status objects for list of task id strings in request body.</p>
<p><code>DELETE /druid/indexer/v1/pendingSegments/{dataSource}</code></p>
<p>Manually clean up pending segments table in metadata storage for <code>datasource</code>. Returns a JSON object response with
<code>numDeleted</code> and count of rows deleted from the pending segments table. This API is used by the
<code>druid.coordinator.kill.pendingSegments.on</code> <a href="/docs/latest/configuration/index.html#coordinator-operation">coordinator setting</a>
which automates this operation to perform periodically.</p>
<h4><a class="anchor" aria-hidden="true" id="supervisors"></a><a href="#supervisors" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Supervisors</h4>
<p><code>GET /druid/indexer/v1/supervisor</code></p>
<p>Returns a list of strings of the currently active supervisor ids.</p>
<p><code>GET /druid/indexer/v1/supervisor?full</code></p>
<p>Returns a list of objects of the currently active supervisors.</p>
<table>
<thead>
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td><code>id</code></td><td>String</td><td>supervisor unique identifier</td></tr>
<tr><td><code>state</code></td><td>String</td><td>basic state of the supervisor. Available states:<code>UNHEALTHY_SUPERVISOR</code>, <code>UNHEALTHY_TASKS</code>, <code>PENDING</code>, <code>RUNNING</code>, <code>SUSPENDED</code>, <code>STOPPING</code>. Check <a href="/docs/latest/development/extensions-core/kafka-supervisor-operations.html">Kafka Docs</a> for details.</td></tr>
<tr><td><code>detailedState</code></td><td>String</td><td>supervisor specific state. (See documentation of specific supervisor for details), e.g. <a href="/docs/latest/development/extensions-core/kafka-ingestion.html">Kafka</a> or <a href="/docs/latest/development/extensions-core/kinesis-ingestion.html">Kinesis</a>)</td></tr>
<tr><td><code>healthy</code></td><td>Boolean</td><td>true or false indicator of overall supervisor health</td></tr>
<tr><td><code>spec</code></td><td>SupervisorSpec</td><td>json specification of supervisor (See Supervisor Configuration for details)</td></tr>
</tbody>
</table>
<p><code>GET /druid/indexer/v1/supervisor?state=true</code></p>
<p>Returns a list of objects of the currently active supervisors and their current state.</p>
<table>
<thead>
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td><code>id</code></td><td>String</td><td>supervisor unique identifier</td></tr>
<tr><td><code>state</code></td><td>String</td><td>basic state of the supervisor. Available states: <code>UNHEALTHY_SUPERVISOR</code>, <code>UNHEALTHY_TASKS</code>, <code>PENDING</code>, <code>RUNNING</code>, <code>SUSPENDED</code>, <code>STOPPING</code>. Check <a href="/docs/latest/development/extensions-core/kafka-supervisor-operations.html">Kafka Docs</a> for details.</td></tr>
<tr><td><code>detailedState</code></td><td>String</td><td>supervisor specific state. (See documentation of the specific supervisor for details, e.g. <a href="/docs/latest/development/extensions-core/kafka-ingestion.html">Kafka</a> or <a href="/docs/latest/development/extensions-core/kinesis-ingestion.html">Kinesis</a>)</td></tr>
<tr><td><code>healthy</code></td><td>Boolean</td><td>true or false indicator of overall supervisor health</td></tr>
<tr><td><code>suspended</code></td><td>Boolean</td><td>true or false indicator of whether the supervisor is in suspended state</td></tr>
</tbody>
</table>
<p><code>GET /druid/indexer/v1/supervisor/&lt;supervisorId&gt;</code></p>
<p>Returns the current spec for the supervisor with the provided ID.</p>
<p><code>GET /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/status</code></p>
<p>Returns the current status of the supervisor with the provided ID.</p>
<p><code>GET/druid/indexer/v1/supervisor/history</code></p>
<p>Returns an audit history of specs for all supervisors (current and past).</p>
<p><code>GET /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/history</code></p>
<p>Returns an audit history of specs for the supervisor with the provided ID.</p>
<p><code>POST /druid/indexer/v1/supervisor</code></p>
<p>Create a new supervisor or update an existing one.</p>
<p><code>POST /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/suspend</code></p>
<p>Suspend the current running supervisor of the provided ID. Responds with updated SupervisorSpec.</p>
<p><code>POST /druid/indexer/v1/supervisor/suspendAll</code></p>
<p>Suspend all supervisors at once.</p>
<p><code>POST /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/resume</code></p>
<p>Resume indexing tasks for a supervisor. Responds with updated SupervisorSpec.</p>
<p><code>POST /druid/indexer/v1/supervisor/resumeAll</code></p>
<p>Resume all supervisors at once.</p>
<p><code>POST /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/reset</code></p>
<p>Reset the specified supervisor.</p>
<p><code>POST /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/terminate</code></p>
<p>Terminate a supervisor of the provided ID.</p>
<p><code>POST /druid/indexer/v1/supervisor/terminateAll</code></p>
<p>Terminate all supervisors at once.</p>
<p><code>POST /druid/indexer/v1/supervisor/&lt;supervisorId&gt;/shutdown</code></p>
<blockquote>
<p>This API is deprecated and will be removed in future releases.
Please use the equivalent 'terminate' instead.</p>
</blockquote>
<p>Shutdown a supervisor.</p>
<h4><a class="anchor" aria-hidden="true" id="dynamic-configuration-1"></a><a href="#dynamic-configuration-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Dynamic configuration</h4>
<p>See <a href="/docs/latest/configuration/index.html#overlord-dynamic-configuration">Overlord Dynamic Configuration</a> for details.</p>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<p><code>GET /druid/indexer/v1/worker</code></p>
<p>Retrieves current overlord dynamic configuration.</p>
<p><code>GET /druid/indexer/v1/worker/history?interval={interval}&amp;count={count}</code></p>
<p>Retrieves history of changes to overlord dynamic configuration. Accepts <code>interval</code> and <code>count</code> query string parameters
to filter by interval and limit the number of results respectively.</p>
<p><code>GET /druid/indexer/v1/workers</code></p>
<p>Retrieves a list of all the worker nodes in the cluster along with its metadata.</p>
<p><code>GET /druid/indexer/v1/scaling</code></p>
<p>Retrieves overlord scaling events if auto-scaling runners are in use.</p>
<p><code>POST /druid/indexer/v1/worker</code></p>
<p>Update overlord dynamic worker configuration.</p>
<h2><a class="anchor" aria-hidden="true" id="data-server"></a><a href="#data-server" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Data server</h2>
<p>This section documents the API endpoints for the processes that reside on Data servers (MiddleManagers/Peons and Historicals)
in the suggested <a href="/docs/latest/design/processes.html#server-types">three-server configuration</a>.</p>
<h3><a class="anchor" aria-hidden="true" id="middlemanager"></a><a href="#middlemanager" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MiddleManager</h3>
<p><code>GET /druid/worker/v1/enabled</code></p>
<p>Check whether a MiddleManager is in an enabled or disabled state. Returns JSON object keyed by the combined <code>druid.host</code>
and <code>druid.port</code> with the boolean state as the value.</p>
<pre><code class="hljs css language-json">{<span class="hljs-attr">"localhost:8091"</span>:<span class="hljs-literal">true</span>}
</code></pre>
<p><code>GET /druid/worker/v1/tasks</code></p>
<p>Retrieve a list of active tasks being run on MiddleManager. Returns JSON list of taskid strings. Normal usage should
prefer to use the <code>/druid/indexer/v1/tasks</code> <a href="#overlord">Overlord API</a> or one of it's task state specific variants instead.</p>
<pre><code class="hljs css language-json">[<span class="hljs-string">"index_wikiticker_2019-02-11T02:20:15.316Z"</span>]
</code></pre>
<p><code>GET /druid/worker/v1/task/{taskid}/log</code></p>
<p>Retrieve task log output stream by task id. Normal usage should prefer to use the <code>/druid/indexer/v1/task/{taskId}/log</code>
<a href="#overlord">Overlord API</a> instead.</p>
<p><code>POST /druid/worker/v1/disable</code></p>
<p>Disable a MiddleManager, causing it to stop accepting new tasks but complete all existing tasks. Returns JSON object
keyed by the combined <code>druid.host</code> and <code>druid.port</code>:</p>
<pre><code class="hljs css language-json">{<span class="hljs-attr">"localhost:8091"</span>:<span class="hljs-string">"disabled"</span>}
</code></pre>
<p><code>POST /druid/worker/v1/enable</code></p>
<p>Enable a MiddleManager, allowing it to accept new tasks again if it was previously disabled. Returns JSON object
keyed by the combined <code>druid.host</code> and <code>druid.port</code>:</p>
<pre><code class="hljs css language-json">{<span class="hljs-attr">"localhost:8091"</span>:<span class="hljs-string">"enabled"</span>}
</code></pre>
<p><code>POST /druid/worker/v1/task/{taskid}/shutdown</code></p>
<p>Shutdown a running task by <code>taskid</code>. Normal usage should prefer to use the <code>/druid/indexer/v1/task/{taskId}/shutdown</code>
<a href="#overlord">Overlord API</a> instead. Returns JSON:</p>
<pre><code class="hljs css language-json">{<span class="hljs-attr">"task"</span>:<span class="hljs-string">"index_kafka_wikiticker_f7011f8ffba384b_fpeclode"</span>}
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="peon"></a><a href="#peon" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Peon</h3>
<p><code>GET /druid/worker/v1/chat/{taskId}/rowStats</code></p>
<p>Retrieve a live row stats report from a Peon. See <a href="/docs/latest/ingestion/tasks.html#task-reports">task reports</a> for more details.</p>
<p><code>GET /druid/worker/v1/chat/{taskId}/unparseableEvents</code></p>
<p>Retrieve an unparseable events report from a Peon. See <a href="/docs/latest/ingestion/tasks.html#task-reports">task reports</a> for more details.</p>
<h3><a class="anchor" aria-hidden="true" id="historical"></a><a href="#historical" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Historical</h3>
<h4><a class="anchor" aria-hidden="true" id="segment-loading-1"></a><a href="#segment-loading-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Segment loading</h4>
<p><code>GET /druid/historical/v1/loadstatus</code></p>
<p>Returns JSON of the form <code>{&quot;cacheInitialized&quot;:&lt;value&gt;}</code>, where value is either <code>true</code> or <code>false</code> 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.</p>
<p><code>GET /druid/historical/v1/readiness</code></p>
<p>Similar to <code>/druid/historical/v1/loadstatus</code>, 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.</p>
<h2><a class="anchor" aria-hidden="true" id="query-server"></a><a href="#query-server" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Query server</h2>
<p>This section documents the API endpoints for the processes that reside on Query servers (Brokers) in the suggested <a href="/docs/latest/design/processes.html#server-types">three-server configuration</a>.</p>
<h3><a class="anchor" aria-hidden="true" id="broker"></a><a href="#broker" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Broker</h3>
<h4><a class="anchor" aria-hidden="true" id="datasource-information"></a><a href="#datasource-information" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Datasource information</h4>
<p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
(e.g., 2016-06-27_2016-06-28).</p>
<blockquote>
<p>Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL
<a href="/docs/latest/querying/sql-metadata-tables.html#tables-table"><code>INFORMATION_SCHEMA.TABLES</code></a>,
<a href="/docs/latest/querying/sql-metadata-tables.html#columns-table"><code>INFORMATION_SCHEMA.COLUMNS</code></a>, and
<a href="/docs/latest/querying/sql-metadata-tables.html#segments-table"><code>sys.segments</code></a> tables.</p>
</blockquote>
<p><code>GET /druid/v2/datasources</code></p>
<p>Returns a list of queryable datasources.</p>
<p><code>GET /druid/v2/datasources/{dataSourceName}</code></p>
<p>Returns the dimensions and metrics of the datasource. Optionally, you can provide request parameter &quot;full&quot; to get list of served intervals with dimensions and metrics being served for those intervals. You can also provide request param &quot;interval&quot; explicitly to refer to a particular interval.</p>
<p>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: <code>druid.query.segmentMetadata.defaultHistory</code></p>
<p><code>GET /druid/v2/datasources/{dataSourceName}/dimensions</code></p>
<blockquote>
<p>This API is deprecated and will be removed in future releases. Please use <a href="/docs/latest/querying/segmentmetadataquery.html">SegmentMetadataQuery</a> instead
which provides more comprehensive information and supports all dataSource types including streaming dataSources. It's also encouraged to use <a href="/docs/latest/querying/sql-metadata-tables.html">INFORMATION_SCHEMA tables</a>
if you're using SQL.</p>
</blockquote>
<p>Returns the dimensions of the datasource.</p>
<p><code>GET /druid/v2/datasources/{dataSourceName}/metrics</code></p>
<blockquote>
<p>This API is deprecated and will be removed in future releases. Please use <a href="/docs/latest/querying/segmentmetadataquery.html">SegmentMetadataQuery</a> instead
which provides more comprehensive information and supports all dataSource types including streaming dataSources. It's also encouraged to use <a href="/docs/latest/querying/sql-metadata-tables.html">INFORMATION_SCHEMA tables</a>
if you're using SQL.</p>
</blockquote>
<p>Returns the metrics of the datasource.</p>
<p><code>GET /druid/v2/datasources/{dataSourceName}/candidates?intervals={comma-separated-intervals}&amp;numCandidates={numCandidates}</code></p>
<p>Returns segment information lists including server locations for the given datasource and intervals. If &quot;numCandidates&quot; is not specified, it will return all servers for each interval.</p>
<h4><a class="anchor" aria-hidden="true" id="load-status"></a><a href="#load-status" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Load Status</h4>
<p><code>GET /druid/broker/v1/loadstatus</code></p>
<p>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.</p>
<p><code>GET /druid/broker/v1/readiness</code></p>
<p>Similar to <code>/druid/broker/v1/loadstatus</code>, but instead of returning a JSON, responses 200 OK if its ready and otherwise 503 SERVICE UNAVAILABLE.</p>
<h4><a class="anchor" aria-hidden="true" id="queries"></a><a href="#queries" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Queries</h4>
<p><code>POST /druid/v2/</code></p>
<p>The endpoint for submitting queries. Accepts an option <code>?pretty</code> that pretty prints the results.</p>
<p><code>POST /druid/v2/candidates/</code></p>
<p>Returns segment information lists including server locations for the given query..</p>
<h3><a class="anchor" aria-hidden="true" id="router"></a><a href="#router" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Router</h3>
<blockquote>
<p>Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL
<a href="/docs/latest/querying/sql-metadata-tables.html#tables-table"><code>INFORMATION_SCHEMA.TABLES</code></a>,
<a href="/docs/latest/querying/sql-metadata-tables.html#columns-table"><code>INFORMATION_SCHEMA.COLUMNS</code></a>, and
<a href="/docs/latest/querying/sql-metadata-tables.html#segments-table"><code>sys.segments</code></a> tables.</p>
</blockquote>
<p><code>GET /druid/v2/datasources</code></p>
<p>Returns a list of queryable datasources.</p>
<p><code>GET /druid/v2/datasources/{dataSourceName}</code></p>
<p>Returns the dimensions and metrics of the datasource.</p>
<p><code>GET /druid/v2/datasources/{dataSourceName}/dimensions</code></p>
<p>Returns the dimensions of the datasource.</p>
<p><code>GET /druid/v2/datasources/{dataSourceName}/metrics</code></p>
<p>Returns the metrics of the datasource.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/latest/operations/alerts.html"><span class="arrow-prev">โ† </span><span>Alerts</span></a><a class="docs-next button" href="/docs/latest/operations/high-availability.html"><span>High availability</span><span class="arrow-next"> โ†’</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#common">Common</a><ul class="toc-headings"><li><a href="#process-information">Process information</a></li></ul></li><li><a href="#master-server">Master server</a><ul class="toc-headings"><li><a href="#coordinator">Coordinator</a></li><li><a href="#overlord">Overlord</a></li></ul></li><li><a href="#data-server">Data server</a><ul class="toc-headings"><li><a href="#middlemanager">MiddleManager</a></li><li><a href="#peon">Peon</a></li><li><a href="#historical">Historical</a></li></ul></li><li><a href="#query-server">Query server</a><ul class="toc-headings"><li><a href="#broker">Broker</a></li><li><a href="#router">Router</a></li></ul></li></ul></nav></div><footer class="nav-footer druid-footer" id="footer"><div class="container"><div class="text-center"><p><a href="/technology">Technology</a>โ€‚ยทโ€‚<a href="/use-cases">Use Cases</a>โ€‚ยทโ€‚<a href="/druid-powered">Powered by Druid</a>โ€‚ยทโ€‚<a href="/docs/latest/">Docs</a>โ€‚ยทโ€‚<a href="/community/">Community</a>โ€‚ยทโ€‚<a href="/downloads.html">Download</a>โ€‚ยทโ€‚<a href="/faq">FAQ</a></p></div><div class="text-center"><a title="Join the user group" href="https://groups.google.com/forum/#!forum/druid-user" target="_blank"><span class="fa fa-comments"></span></a>โ€‚ยทโ€‚<a title="Follow Druid" href="https://twitter.com/druidio" target="_blank"><span class="fab fa-twitter"></span></a>โ€‚ยทโ€‚<a title="Download via Apache" href="https://www.apache.org/dyn/closer.cgi?path=/incubator/druid/{{ site.druid_versions[0].versions[0].version }}/apache-druid-{{ site.druid_versions[0].versions[0].version }}-bin.tar.gz" target="_blank"><span class="fas fa-feather"></span></a>โ€‚ยทโ€‚<a title="GitHub" href="https://github.com/apache/druid" target="_blank"><span class="fab fa-github"></span></a></div><div class="text-center license">Copyright ยฉ 2022 <a href="https://www.apache.org/" target="_blank">Apache Software Foundation</a>.<br/>Except where otherwise noted, licensed under <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.<br/>Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</div></div></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script><script>
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
}
// keyCode for '/' (slash)
if (e.keyCode === 191) {
const search = document.getElementById('search_input_react');
search && search.focus();
}
});
</script><script>
var search = docsearch({
appId: 'CPK9PMSCEY',
apiKey: 'd4ef4ffe3a2f0c7d1e34b062fd98736b',
indexName: 'apache_druid',
inputSelector: '#search_input_react',
algoliaOptions: {"facetFilters":["language:en","version:26.0.0"]}
});
</script></body></html>