Get the action rule bundle
curl --request GET \
--url https://api.visiqlabs.com/allow/rules/bundle \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.visiqlabs.com/allow/rules/bundle"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.visiqlabs.com/allow/rules/bundle', 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://api.visiqlabs.com/allow/rules/bundle",
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://api.visiqlabs.com/allow/rules/bundle"
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://api.visiqlabs.com/allow/rules/bundle")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/rules/bundle")
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{
"version": "<string>",
"agent_mode_by_operation": {},
"shutdown": true,
"rules": [
{
"id": "<string>",
"rule_code": "<string>",
"name": "<string>",
"description": "<string>",
"effect": "<string>",
"rego_source": "<string>",
"resource_type": "<string>",
"target_app": "<string>",
"action_pattern": "<string>",
"conditions": [
{
"field": "<string>",
"operator": "<string>",
"value": "<unknown>"
}
],
"priority": 123
}
],
"no_coverage": {
"no_coverage_defaults": {
"read": "<string>",
"write": "<string>",
"delete": "<string>",
"admin": "<string>"
},
"autopilot_enabled": true,
"enduser_hitl_enabled": true,
"hitl_timeout_seconds": 123
}
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "Rule not found"
}Rule Bundles
Get the action rule bundle
The compiled action-governance bundle for one agent, used by the SDK runtime. Responds with an ETag; send If-None-Match to get a 304. A shutdown agent returns a fail-closed shutdown bundle. Requires permission allow_rules:view.
GET
/
allow
/
rules
/
bundle
Get the action rule bundle
curl --request GET \
--url https://api.visiqlabs.com/allow/rules/bundle \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.visiqlabs.com/allow/rules/bundle"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.visiqlabs.com/allow/rules/bundle', 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://api.visiqlabs.com/allow/rules/bundle",
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://api.visiqlabs.com/allow/rules/bundle"
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://api.visiqlabs.com/allow/rules/bundle")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/rules/bundle")
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{
"version": "<string>",
"agent_mode_by_operation": {},
"shutdown": true,
"rules": [
{
"id": "<string>",
"rule_code": "<string>",
"name": "<string>",
"description": "<string>",
"effect": "<string>",
"rego_source": "<string>",
"resource_type": "<string>",
"target_app": "<string>",
"action_pattern": "<string>",
"conditions": [
{
"field": "<string>",
"operator": "<string>",
"value": "<unknown>"
}
],
"priority": 123
}
],
"no_coverage": {
"no_coverage_defaults": {
"read": "<string>",
"write": "<string>",
"delete": "<string>",
"admin": "<string>"
},
"autopilot_enabled": true,
"enduser_hitl_enabled": true,
"hitl_timeout_seconds": 123
}
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "Rule not found"
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint keys under Connectors -> API Keys in the dashboard.
Query Parameters
The human-readable agent identifier the bundle is compiled for.
Required string length:
1 - 255Response
The compiled bundle.
The compiled action bundle. A shutdown agent returns version: "shutdown", shutdown: true, empty rules, and fail-closed defaults.
⌘I