GET /wlm/rule

[info] Enterprise Edition only

Retrieves a list of rules.

Syntax

GET /api/v3/wlm/rule

Response Output

{
  "tag": "0",
  "rules": [
    {
      "name": "Rule name",
      "conditions": "query condition",
      "acceptId": "ID",
      "acceptName": "Rule name",
      "action": "PLACE",
      "id": "ID"
    }
    ]
 }

Response Codes

403 - User does not have permission to access ruleset.
404 - Ruleset is not found.

Request Example

CURL

curl --request GET \
  --url http://localhost:9047/api/v3/wlm/rule \
  --header 'authorization: _dremioha5lrg03obu07o4fkaev5e4r8n' \
  --header 'content-type: application/json'

Python

import requests

url = "http://localhost:9047/api/v3/wlm/rule"

payload = ""
headers = {
    'authorization': "_dremioha5lrg03obu07o4fkaev5e4r8n",
    'content-type': "application/json"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

Response

{
  "tag": "0",
  "rules": [
    {
      "name": "UI Previews",
      "conditions": "query_type() = 'UI Preview'",
      "acceptId": "a7606f6e-6240-4fd6-bfcd-dc191d8295d7",
      "acceptName": "UI Previews",
      "action": "PLACE",
      "id": "04dc84b0-a33d-41d1-8bf1-c9914b305d16"
    },
    {
      "name": "High Cost Reflections",
      "conditions": "query_type() = 'Reflections' AND query_cost() >= 30000000",
      "acceptId": "3736910c-507b-4527-8aa1-41544ba7eb3a",
      "acceptName": "High Cost Reflections",
      "action": "PLACE",
      "id": "a02c33f0-8c34-4129-9a4f-1ca9daacf3b0"
    },
    {
      "name": "Low Cost Reflections",
      "conditions": "query_type() = 'Reflections' AND query_cost() < 30000000",
      "acceptId": "54b6941b-6d3a-4b71-977b-1ec3029dda9a",
      "acceptName": "Low Cost Reflections",
      "action": "PLACE",
      "id": "e5844b2b-c6f8-4e95-abc5-f45818a09f78"
    },
    {
      "name": "High Cost User Queries",
      "conditions": "query_cost() >= 30000000",
      "acceptId": "19f8fde2-66e8-403e-b0e1-c01c5d14b9b1",
      "acceptName": "High Cost User Queries",
      "action": "PLACE",
      "id": "1b8760dc-ecff-4429-9453-0a26719221bd"
    },
    {
      "name": "Low Cost User Queries",
      "conditions": "query_cost() < 30000000",
      "acceptId": "360fa7c1-a691-4d42-a045-8c066abb4990",
      "acceptName": "Low Cost User Queries",
      "action": "PLACE",
      "id": "6eac41cc-811a-4a28-92f5-ca9fc0182186"
    }
  ]
}

results matching ""

    No results matching ""