Get the Runtime Shield baseline policy
The effective baseline policy for the key's organization. Returns platform defaults when the organization has not customized it.
curl -X GET "https://www.agentkeeper.dev/api/v1/shield/policy" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://www.agentkeeper.dev/api/v1/shield/policy"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://www.agentkeeper.dev/api/v1/shield/policy", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://www.agentkeeper.dev/api/v1/shield/policy", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://www.agentkeeper.dev/api/v1/shield/policy')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"security_level": "strict",
"custom_blacklist": [
"example_string"
],
"trusted_sources": [
"example_string"
],
"entropy_threshold": 4.5,
"max_input_length": 10000,
"auto_block": true
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
GET
/api/v1/shield/policy
GET
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token
Bearer Tokenstring
RequiredAn AgentKeeper API key, sent as Authorization: Bearer ak_live_….
An AgentKeeper API key, sent as
Authorization: Bearer ak_live_….Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. An AgentKeeper API key, sent as Authorization: Bearer ak_live_….
Responses
security_levelstring
Allowed values:
strictbalancedpermissivecustom_blackliststring[]
trusted_sourcesstring[]
entropy_thresholdnumber
max_input_lengthinteger
auto_blockboolean
Was this page helpful?