List Policy Imports
curl --request GET \
--url https://api.example.com/api/policies/importimport requests
url = "https://api.example.com/api/policies/import"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/policies/import', 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.example.com/api/policies/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/policies/import"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/policies/import")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/policies/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"imports": [
{
"import_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "activated",
"rule_count": 5,
"created_at": "2026-01-15T10:30:00Z"
},
{
"import_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"status": "pending_review",
"rule_count": 3,
"created_at": "2026-01-20T14:15:00Z"
}
],
"count": 2
}
Custom Policies
List Policy Imports
List all policy imports for your account
GET
/
api
/
policies
/
import
List Policy Imports
curl --request GET \
--url https://api.example.com/api/policies/importimport requests
url = "https://api.example.com/api/policies/import"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/policies/import', 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.example.com/api/policies/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/policies/import"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/policies/import")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/policies/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"imports": [
{
"import_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "activated",
"rule_count": 5,
"created_at": "2026-01-15T10:30:00Z"
},
{
"import_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"status": "pending_review",
"rule_count": 3,
"created_at": "2026-01-20T14:15:00Z"
}
],
"count": 2
}
Retrieve a list of all policy imports associated with your API key.
Response
array
integer
Total number of imports
{
"imports": [
{
"import_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "activated",
"rule_count": 5,
"created_at": "2026-01-15T10:30:00Z"
},
{
"import_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"status": "pending_review",
"rule_count": 3,
"created_at": "2026-01-20T14:15:00Z"
}
],
"count": 2
}
Example
curl -X GET "https://{api-url}/api/policies/import" \
-H "x-api-key: YOUR_API_KEY"
import requests
API_KEY = "YOUR_API_KEY"
API_BASE = "https://{api-url}"
response = requests.get(
f"{API_BASE}/api/policies/import",
headers={"x-api-key": API_KEY}
)
for imp in response.json()["imports"]:
print(f"{imp['import_id']} — {imp['status']} ({imp['rule_count']} rules)")
const axios = require('axios');
const API_KEY = 'YOUR_API_KEY';
const API_BASE = 'https://{api-url}';
const response = await axios.get(
`${API_BASE}/api/policies/import`,
{
headers: { 'x-api-key': API_KEY }
}
);
response.data.imports.forEach(imp => {
console.log(`${imp.import_id} — ${imp.status} (${imp.rule_count} rules)`);
});
⌘I

