Get rotator rules
curl --request GET \
--url https://panel.metricanic.com/api/v1/rotators/{id}/rules \
--header 'Authorization: Bearer <token>'import requests
url = "https://panel.metricanic.com/api/v1/rotators/{id}/rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://panel.metricanic.com/api/v1/rotators/{id}/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.metricanic.com/api/v1/rotators/{id}/rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.metricanic.com/api/v1/rotators/{id}/rules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://panel.metricanic.com/api/v1/rotators/{id}/rules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.metricanic.com/api/v1/rotators/{id}/rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": [
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5e",
"label": "Default",
"priority": 0,
"enabled": true,
"conditions": {
"version": 2,
"mode": "all",
"clauses": []
},
"streams": [
{
"streamIdx": 1,
"name": "Stream A",
"weight": 100,
"enabled": true,
"pathId": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
"action": {
"type": "redirect"
},
"deletedAt": null,
"landers": [
{
"landingId": "4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f",
"weight": 100,
"enabled": true
}
],
"offers": [
{
"offerId": "2e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b",
"weight": 100,
"enabled": true
}
]
}
]
}
]
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}Rotators
Get rotator rules
Returns routing rules in priority order, including conditions, paths, landings, offers and weights. Manage routing rules in the rotator editor.
GET
/
api
/
v1
/
rotators
/
{id}
/
rules
Get rotator rules
curl --request GET \
--url https://panel.metricanic.com/api/v1/rotators/{id}/rules \
--header 'Authorization: Bearer <token>'import requests
url = "https://panel.metricanic.com/api/v1/rotators/{id}/rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://panel.metricanic.com/api/v1/rotators/{id}/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.metricanic.com/api/v1/rotators/{id}/rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.metricanic.com/api/v1/rotators/{id}/rules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://panel.metricanic.com/api/v1/rotators/{id}/rules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.metricanic.com/api/v1/rotators/{id}/rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": [
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5e",
"label": "Default",
"priority": 0,
"enabled": true,
"conditions": {
"version": 2,
"mode": "all",
"clauses": []
},
"streams": [
{
"streamIdx": 1,
"name": "Stream A",
"weight": 100,
"enabled": true,
"pathId": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
"action": {
"type": "redirect"
},
"deletedAt": null,
"landers": [
{
"landingId": "4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f",
"weight": 100,
"enabled": true
}
],
"offers": [
{
"offerId": "2e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b",
"weight": 100,
"enabled": true
}
]
}
]
}
]
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}Authorizations
Workspace-scoped token sent in the Authorization header as Bearer . Access depends on the credential's allowed operations, read or write scope, and workspace subscription. Use an API key issued in the tracker for Public API v1. MCP uses separate OAuth credentials.