| <!-- |
| 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. |
| --> |
| <service role="DRUID-ROUTER" name="druid-router" version="0.0.1"> |
| <metadata> |
| <type>API</type> |
| <context>/druid-router</context> |
| <shortDesc>Druid Router API</shortDesc> |
| <description>The Apache Druid Router process can be used to route queries to different Broker processes. By default, the broker routes queries based on how Rules are set up</description> |
| <samples> |
| <sample> |
| <description>Fetch a list of queryable datasources</description> |
| <method>GET</method> |
| <path>druid/v2/datasources</path> |
| </sample> |
| <sample> |
| <description>Fetch the dimensions and metrics of the datasource</description> |
| <method>GET</method> |
| <path>druid/v2/datasources/{dataSourceName}</path> |
| </sample> |
| <sample> |
| <description>Fetch the metrics of the datasource</description> |
| <method>GET</method> |
| <path>druid/v2/datasources/{dataSourceName}/metrics</path> |
| </sample> |
| <sample> |
| <description>You may check out Apache Druid Router's REST API documentation here</description> |
| <value>https://druid.apache.org/docs/latest/operations/api-reference.html#router</value> |
| </sample> |
| </samples> |
| </metadata> |
| <policies> |
| <policy role="webappsec"/> |
| <policy role="authentication" name="Anonymous"/> |
| <policy role="rewrite"/> |
| <policy role="authorization"/> |
| </policies> |
| <routes> |
| <route path="druid-router/druid/router/v1/{**}?{**}"> |
| <rewrite apply="DRUID-ROUTER/druid-router/inbound/api"/> |
| </route> |
| <route path="druid-router/druid/v2/"> |
| <rewrite apply="DRUID-ROUTER/druid-router/inbound/root/"/> |
| </route> |
| <route path="druid-router/druid/v2/**"> |
| <rewrite apply="DRUID-ROUTER/druid-router/inbound/path"/> |
| </route> |
| <route path="druid-router/druid/v2/**?**"> |
| <rewrite apply="DRUID-ROUTER/druid-router/inbound/query"/> |
| </route> |
| <route path="druid-router/status"> |
| <rewrite apply="DRUID-ROUTER/druid-router/inbound/status"/> |
| </route> |
| </routes> |
| </service> |
| |