List HTTP policies
curl --request GET \
--url https://sailbox-api.sailresearch.com/v1/http-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://sailbox-api.sailresearch.com/v1/http-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sailbox-api.sailresearch.com/v1/http-policies', 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://sailbox-api.sailresearch.com/v1/http-policies",
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://sailbox-api.sailresearch.com/v1/http-policies"
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://sailbox-api.sailresearch.com/v1/http-policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sailbox-api.sailresearch.com/v1/http-policies")
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{
"data": [
{
"id": "hp_6f3a8d21-4b7c-4e90-a125-9d2f6c8b3a41",
"org_id": "org_1a2b3c",
"name": "github",
"created_at": "2026-08-20T09:35:00Z",
"updated_at": "2026-08-20T09:35:00Z",
"host_count": 1,
"rule_count": 1,
"referenced_secret_names": [
"GITHUB_TOKEN"
],
"attachment_count": 2
}
],
"limit": 50,
"offset": 0,
"total": 1,
"has_more": false
}{
"error": {
"message": "limit must be between 1 and 100",
"type": "invalid_request_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error",
"param": null,
"code": "invalid_api_key"
}
}{
"error": {
"message": "Your API key has been disabled due to insufficient credits. Visit https://app.sailresearch.com/billing to add credits.",
"type": "billing_error",
"param": null,
"code": "credits_exhausted",
"billing_url": "https://app.sailresearch.com/billing"
}
}{
"error": {
"message": "sailboxes require an organization-scoped API key",
"type": "permission_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Too many concurrent requests. Please retry after some of your organization's in-flight requests complete.",
"type": "rate_limit_error",
"param": null,
"code": "rate_limited"
}
}{
"error": {
"message": "list HTTP policies failed",
"type": "server_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Authentication service unavailable",
"type": "server_error",
"param": null,
"code": null
}
}HTTP policies
List HTTP policies
Returns a page of your organization’s HTTP policies. Each item includes usage counts and secret names, but not the policy document.
GET
/
http-policies
List HTTP policies
curl --request GET \
--url https://sailbox-api.sailresearch.com/v1/http-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://sailbox-api.sailresearch.com/v1/http-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sailbox-api.sailresearch.com/v1/http-policies', 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://sailbox-api.sailresearch.com/v1/http-policies",
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://sailbox-api.sailresearch.com/v1/http-policies"
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://sailbox-api.sailresearch.com/v1/http-policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sailbox-api.sailresearch.com/v1/http-policies")
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{
"data": [
{
"id": "hp_6f3a8d21-4b7c-4e90-a125-9d2f6c8b3a41",
"org_id": "org_1a2b3c",
"name": "github",
"created_at": "2026-08-20T09:35:00Z",
"updated_at": "2026-08-20T09:35:00Z",
"host_count": 1,
"rule_count": 1,
"referenced_secret_names": [
"GITHUB_TOKEN"
],
"attachment_count": 2
}
],
"limit": 50,
"offset": 0,
"total": 1,
"has_more": false
}{
"error": {
"message": "limit must be between 1 and 100",
"type": "invalid_request_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error",
"param": null,
"code": "invalid_api_key"
}
}{
"error": {
"message": "Your API key has been disabled due to insufficient credits. Visit https://app.sailresearch.com/billing to add credits.",
"type": "billing_error",
"param": null,
"code": "credits_exhausted",
"billing_url": "https://app.sailresearch.com/billing"
}
}{
"error": {
"message": "sailboxes require an organization-scoped API key",
"type": "permission_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Too many concurrent requests. Please retry after some of your organization's in-flight requests complete.",
"type": "rate_limit_error",
"param": null,
"code": "rate_limited"
}
}{
"error": {
"message": "list HTTP policies failed",
"type": "server_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Authentication service unavailable",
"type": "server_error",
"param": null,
"code": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
How many policies to return.
Required range:
1 <= x <= 100How many policies to skip before the page starts.
Required range:
0 <= x <= 100000Only return policies whose ID or name contains this text, ignoring case. At most 256 characters after surrounding whitespace is trimmed.
Response
A page of policies.
The requested page of policy summaries.
Show child attributes
Show child attributes
Page size that was applied.
Required range:
1 <= x <= 100Offset that was applied.
Required range:
0 <= x <= 100000Total number of policies matching the search.
Required range:
x >= 0Whether another page follows this one.
⌘I