Guardrails
Authorizations
Query parameters
pageintegerOptionalDefault:
0
limitintegerOptionalDefault:
100
orderany ofOptional
stringOptional
nullOptional
directionany ofOptional
stringOptional
nullOptional
searchany ofOptional
stringOptional
nullOptional
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
get
GET /api/guardrails HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": 1,
"title": "text",
"scope_type": "Global",
"scope_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"action": "Block",
"created_at": "2025-06-27T13:20:43.263Z",
"updated_at": "2025-06-27T13:20:43.263Z",
"success_rate": 1,
"success_rate_delta": 1,
"rules": [
{
"id": 1,
"entity_type": "Dependency",
"rule_type": "Vulnerability",
"rule_config": {
"rule_sub_type": "text",
"rule_params": {
"threshold": 5,
"operator": "<",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
],
"executions_last_30_days": 1,
"last_executed": "2025-06-27T13:20:43.263Z"
}
],
"total": 1,
"pages": 1,
"page_size": 1,
"page_number": 1
}
Authorizations
Body
titlestringRequired
scope_typestring · enumRequiredPossible values:
scope_paramsany ofOptional
or
nullOptional
actionstring · enumRequiredPossible values:
Responses
200
Successful Response
application/json
Responseany
404
Not found
422
Validation Error
application/json
post
POST /api/guardrails HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 269
{
"title": "text",
"scope_type": "Global",
"scope_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"action": "Block",
"rules": [
{
"id": 1,
"entity_type": "Dependency",
"rule_type": "Vulnerability",
"rule_sub_type": "Active Exploit",
"rule_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
No content
Authorizations
Path parameters
scope_typestring · enumRequiredPossible values:
paramstringRequired
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
get
GET /api/guardrails/supported_scopes/{scope_type}/params/{param} HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[]
Authorizations
Path parameters
guardrail_idintegerRequired
Body
titlestringRequired
scope_typestring · enumRequiredPossible values:
scope_paramsany ofOptional
or
nullOptional
actionstring · enumRequiredPossible values:
Responses
200
Successful Response
application/json
Responseany
404
Not found
422
Validation Error
application/json
put
PUT /api/guardrails/{guardrail_id} HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 269
{
"title": "text",
"scope_type": "Global",
"scope_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"action": "Block",
"rules": [
{
"id": 1,
"entity_type": "Dependency",
"rule_type": "Vulnerability",
"rule_sub_type": "Active Exploit",
"rule_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
No content
Authorizations
Query parameters
code_root_idany ofOptional
integerOptional
nullOptional
pageintegerOptionalDefault:
0
limitintegerOptionalDefault:
100
orderany ofOptional
stringOptional
nullOptional
directionany ofOptional
stringOptional
nullOptional
searchany ofOptional
stringOptional
nullOptional
Body
itemsany ofOptional
or
or
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
post
POST /api/guardrails/executions HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 58
[
{
"name": "text",
"lt": 1,
"lte": 1,
"gt": 1,
"gte": 1,
"equals": 1
}
]
{
"items": [
{
"id": 1,
"check_run_id": 1,
"executed_at": "2025-06-27T13:20:43.263Z",
"external_url": "text",
"entity_type": "Dependency",
"rule_type": "Vulnerability",
"rule_sub_type": "Active Exploit",
"scope_type": "Global",
"rule_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"scope_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"title": "text",
"rules": [
{
"entity_type": "Dependency",
"rule_type": "Vulnerability",
"rule_sub_type": "Active Exploit",
"rule_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"scopes": [
{
"scope_type": "Global",
"scope_params": {}
}
],
"action": "Block",
"guardrail_name": "text",
"result": "Pass",
"contributor": "text",
"identity": {
"id": 1,
"name": "text",
"email": "text",
"alternate_emails": [
"text"
],
"is_hidden": true
},
"violations": [
{
"file": "text",
"line": 1,
"content": "text"
}
]
}
],
"total": 1,
"pages": 1,
"page_size": 1,
"page_number": 1
}
Authorizations
Query parameters
code_root_idany ofOptional
integerOptional
nullOptional
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
get
GET /api/guardrails/executions/_terms HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"terms": [
{
"name": "text",
"type": "Int",
"terms": [
{
"lowerBound": 1,
"upperBound": 1,
"count": 1
}
]
}
]
}
Authorizations
Path parameters
guardrail_idintegerRequired
Query parameters
pageintegerOptionalDefault:
0
limitintegerOptionalDefault:
100
orderany ofOptional
stringOptional
nullOptional
directionany ofOptional
stringOptional
nullOptional
searchany ofOptional
stringOptional
nullOptional
Body
itemsany ofOptional
or
or
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
post
POST /api/guardrails/{guardrail_id}/executions HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 58
[
{
"name": "text",
"lt": 1,
"lte": 1,
"gt": 1,
"gte": 1,
"equals": 1
}
]
{
"items": [
{
"executed_at": "2025-06-27T13:20:43.263Z",
"external_url": "text",
"result": "Pass",
"contributor": "text",
"violations": [
{
"file": "text",
"line": 1,
"content": "text"
}
],
"code_root": "text",
"code_root_id": 1,
"repository_type": "text",
"repository_owner": "text",
"repository_id": "text",
"repository": "text",
"pr_url": "text"
}
],
"total": 1,
"pages": 1,
"page_size": 1,
"page_number": 1
}
Authorizations
Responses
200
Successful Response
application/json
404
Not found
get
GET /api/guardrails/executions/modal/_terms HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"terms": [
{
"name": "text",
"type": "Int",
"terms": [
{
"lowerBound": 1,
"upperBound": 1,
"count": 1
}
]
}
]
}
Was this helpful?