GetAgentHookPolicyDefinition
Fetches an AgentHookPolicyDefinition specified by its UUID.
GET
/
v1
/
namespaces
/
{tenant_meta.namespace}
/
agent-hook-policy-definitions
/
{uuid}
GetAgentHookPolicyDefinition
curl --request GET \
--url https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}import requests
url = "https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}', 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.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}",
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.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}"
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.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}")
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{
"meta": {
"name": "<string>",
"annotations": {},
"create_time": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"index_data": {
"data": [
"<string>"
],
"search_score": 123,
"tenant": "<string>",
"will_be_deleted_at": "2023-11-07T05:31:56Z"
},
"kind": "<string>",
"parent_kind": "<string>",
"parent_uuid": "<string>",
"references": {},
"tags": [
"<string>"
],
"update_time": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"upsert_time": "2023-11-07T05:31:56Z",
"version": "<string>"
},
"propagate": true,
"spec": {
"policy": {
"action": {
"alert": {
"feedback_message": "<string>",
"message": "<string>"
},
"ask": {
"feedback_message": "<string>",
"message": "<string>"
},
"auto": {},
"block": {
"feedback_message": "<string>",
"message": "<string>"
},
"feedback": {
"feedback_message": "<string>",
"message": "<string>"
},
"match_type": "MATCH_TYPE_UNSPECIFIED"
},
"activity": {
"auto_mode": {
"deployment_context": [
"<string>"
],
"judge_scope": "JUDGE_SCOPE_UNSPECIFIED"
},
"cmd_line": {
"command_risk_category": "COMMAND_RISK_CATEGORY_UNSPECIFIED",
"patterns": [
"<string>"
]
},
"dependency_risk": {
"ecosystems": [
"<string>"
],
"exclude_file_patterns": [
"<string>"
],
"include_file_patterns": [
"<string>"
],
"include_transitives": true,
"min_cvss_severity": "SEVERITY_UNSPECIFIED"
},
"file_access": {
"file_name_patterns": [
"<string>"
],
"file_operation": "FILE_OPERATION_UNSPECIFIED"
},
"internal_tool": {
"tool_input_matchers": [
"<string>"
],
"tool_input_must_match": true,
"tool_name_matchers": [
"<string>"
]
},
"malware_check": {
"ecosystems": [
"<string>"
]
},
"mcp_server": {
"dimension_at_or_below": {
"authentication_authorization": 123,
"input_validation_injection": 123,
"operational_hygiene": 123,
"supply_chain_provenance": 123
},
"score_at_or_below": 123,
"server_name_matchers": [
"<string>"
]
},
"mcp_tool_call": {
"mcp_server_name": "<string>",
"server_name_matchers": [
"<string>"
],
"tool_input_matchers": [
"<string>"
],
"tool_input_must_match": true,
"tool_name": "<string>",
"tool_name_matchers": [
"<string>"
]
},
"secrets_check": {
"exclude_file_patterns": [
"<string>"
],
"exclude_mcp_server_patterns": [
"<string>"
],
"exclude_rule_ids": [
"<string>"
],
"file_operations": [
"FILE_OPERATION_UNSPECIFIED"
],
"include_file_patterns": [
"<string>"
],
"include_mcp_server_patterns": [
"<string>"
],
"include_rule_ids": [
"<string>"
],
"mcp_payloads": [
"MCP_PAYLOAD_UNSPECIFIED"
]
},
"session": {
"hook": {
"command_matchers": [
"<string>"
],
"event_name_matchers": [
"<string>"
]
},
"model": {
"available_model_matchers": [
"<string>"
],
"default_model_matchers": [
"<string>"
]
},
"permissions": {
"allowed_command_matchers": [
"<string>"
],
"bypass_disabled": true,
"default_mode_matchers": [
"<string>"
],
"denied_command_matchers": [
"<string>"
]
},
"sandbox": {
"allowed_host_matchers": [
"<string>"
],
"enabled": true,
"fail_if_unavailable": true,
"postures": [
"SESSION_SANDBOX_POSTURE_UNSPECIFIED"
]
},
"top_level": {
"composer_mode_matchers": [
"<string>"
],
"group_matchers": [
"<string>"
],
"is_background_agent": true,
"role_matchers": [
"<string>"
],
"source_matchers": [
"<string>"
],
"user_name_matchers": [
"<string>"
]
}
},
"skill": {
"dimension_at_or_below": {
"data_protection": 123,
"external_dependencies": 123,
"instruction_integrity": 123,
"permission_boundaries": 123
},
"name_matchers": [
"<string>"
],
"score_at_or_below": 123
},
"tool_sandbox": {
"excluded_reasons": [
"CALL_SANDBOX_REASON_UNSPECIFIED"
],
"override_requested": true,
"postures": [
"CALL_SANDBOX_POSTURE_UNSPECIFIED"
],
"reasons": [
"CALL_SANDBOX_REASON_UNSPECIFIED"
]
}
},
"enabled": true,
"intent": "POLICY_INTENT_UNSPECIFIED",
"inventory_classification": "INVENTORY_CLASSIFICATION_UNSPECIFIED",
"name": "<string>",
"scope": {
"exclude_user_matchers": [
"<string>"
],
"repository_matchers": [
"<string>"
],
"user_matchers": [
"<string>"
]
},
"system": true
}
},
"tenant_meta": {
"namespace": "<string>"
},
"uuid": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Path Parameters
Query Parameters
Response
A successful response.
AgentHookPolicyDefinition is a top-level CRUD object that stores a single AgentHookPolicy alongside standard metadata.
Was this page helpful?
GetAgentHookPolicyDefinition
curl --request GET \
--url https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}import requests
url = "https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}', 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.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}",
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.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}"
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.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/agent-hook-policy-definitions/{uuid}")
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{
"meta": {
"name": "<string>",
"annotations": {},
"create_time": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"index_data": {
"data": [
"<string>"
],
"search_score": 123,
"tenant": "<string>",
"will_be_deleted_at": "2023-11-07T05:31:56Z"
},
"kind": "<string>",
"parent_kind": "<string>",
"parent_uuid": "<string>",
"references": {},
"tags": [
"<string>"
],
"update_time": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"upsert_time": "2023-11-07T05:31:56Z",
"version": "<string>"
},
"propagate": true,
"spec": {
"policy": {
"action": {
"alert": {
"feedback_message": "<string>",
"message": "<string>"
},
"ask": {
"feedback_message": "<string>",
"message": "<string>"
},
"auto": {},
"block": {
"feedback_message": "<string>",
"message": "<string>"
},
"feedback": {
"feedback_message": "<string>",
"message": "<string>"
},
"match_type": "MATCH_TYPE_UNSPECIFIED"
},
"activity": {
"auto_mode": {
"deployment_context": [
"<string>"
],
"judge_scope": "JUDGE_SCOPE_UNSPECIFIED"
},
"cmd_line": {
"command_risk_category": "COMMAND_RISK_CATEGORY_UNSPECIFIED",
"patterns": [
"<string>"
]
},
"dependency_risk": {
"ecosystems": [
"<string>"
],
"exclude_file_patterns": [
"<string>"
],
"include_file_patterns": [
"<string>"
],
"include_transitives": true,
"min_cvss_severity": "SEVERITY_UNSPECIFIED"
},
"file_access": {
"file_name_patterns": [
"<string>"
],
"file_operation": "FILE_OPERATION_UNSPECIFIED"
},
"internal_tool": {
"tool_input_matchers": [
"<string>"
],
"tool_input_must_match": true,
"tool_name_matchers": [
"<string>"
]
},
"malware_check": {
"ecosystems": [
"<string>"
]
},
"mcp_server": {
"dimension_at_or_below": {
"authentication_authorization": 123,
"input_validation_injection": 123,
"operational_hygiene": 123,
"supply_chain_provenance": 123
},
"score_at_or_below": 123,
"server_name_matchers": [
"<string>"
]
},
"mcp_tool_call": {
"mcp_server_name": "<string>",
"server_name_matchers": [
"<string>"
],
"tool_input_matchers": [
"<string>"
],
"tool_input_must_match": true,
"tool_name": "<string>",
"tool_name_matchers": [
"<string>"
]
},
"secrets_check": {
"exclude_file_patterns": [
"<string>"
],
"exclude_mcp_server_patterns": [
"<string>"
],
"exclude_rule_ids": [
"<string>"
],
"file_operations": [
"FILE_OPERATION_UNSPECIFIED"
],
"include_file_patterns": [
"<string>"
],
"include_mcp_server_patterns": [
"<string>"
],
"include_rule_ids": [
"<string>"
],
"mcp_payloads": [
"MCP_PAYLOAD_UNSPECIFIED"
]
},
"session": {
"hook": {
"command_matchers": [
"<string>"
],
"event_name_matchers": [
"<string>"
]
},
"model": {
"available_model_matchers": [
"<string>"
],
"default_model_matchers": [
"<string>"
]
},
"permissions": {
"allowed_command_matchers": [
"<string>"
],
"bypass_disabled": true,
"default_mode_matchers": [
"<string>"
],
"denied_command_matchers": [
"<string>"
]
},
"sandbox": {
"allowed_host_matchers": [
"<string>"
],
"enabled": true,
"fail_if_unavailable": true,
"postures": [
"SESSION_SANDBOX_POSTURE_UNSPECIFIED"
]
},
"top_level": {
"composer_mode_matchers": [
"<string>"
],
"group_matchers": [
"<string>"
],
"is_background_agent": true,
"role_matchers": [
"<string>"
],
"source_matchers": [
"<string>"
],
"user_name_matchers": [
"<string>"
]
}
},
"skill": {
"dimension_at_or_below": {
"data_protection": 123,
"external_dependencies": 123,
"instruction_integrity": 123,
"permission_boundaries": 123
},
"name_matchers": [
"<string>"
],
"score_at_or_below": 123
},
"tool_sandbox": {
"excluded_reasons": [
"CALL_SANDBOX_REASON_UNSPECIFIED"
],
"override_requested": true,
"postures": [
"CALL_SANDBOX_POSTURE_UNSPECIFIED"
],
"reasons": [
"CALL_SANDBOX_REASON_UNSPECIFIED"
]
}
},
"enabled": true,
"intent": "POLICY_INTENT_UNSPECIFIED",
"inventory_classification": "INVENTORY_CLASSIFICATION_UNSPECIFIED",
"name": "<string>",
"scope": {
"exclude_user_matchers": [
"<string>"
],
"repository_matchers": [
"<string>"
],
"user_matchers": [
"<string>"
]
},
"system": true
}
},
"tenant_meta": {
"namespace": "<string>"
},
"uuid": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}