UpdateSystemConfig
Updates the system configuration.
PATCH
/
v1
/
namespaces
/
{object.tenant_meta.namespace}
/
system-config
UpdateSystemConfig
curl --request PATCH \
--url https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config \
--header 'Content-Type: application/json' \
--data '
{
"object": {
"propagate": true,
"spec": {
"ai": {
"code_segment_processing": true
},
"analytics": {
"cvss_version": "CVSS_VERSION_UNSPECIFIED",
"enable_finding_prioritization": true,
"enable_version_upgrade_prioritization": true
},
"artifactory": {
"enable_streaming": true
},
"cloud_deployment": {
"nat_network_requests": true
},
"endor_ignore": {
"custom_file_names": [
"<string>"
],
"enable": true
},
"finding_prioritization": {
"factors": {}
},
"logging": {
"enable_remote_logging": true,
"remote_ep": "<string>",
"remote_log_level": "LOG_LEVEL_UNSPECIFIED"
},
"package_firewall": {
"cvss_severity_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"cvss_severity_threshold": "CVSS_SEVERITY_LEVEL_UNSPECIFIED",
"exceptions": [
{
"ecosystem": "ECOSYSTEM_UNSPECIFIED",
"package_name": "<string>",
"exact_versions": [
"<string>"
],
"version_ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
],
"malware_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_hours": 123,
"notification_rules": [
{
"name": "<string>",
"notification_target_uuids": [
"<string>"
],
"on_actions": [
"PACKAGE_FIREWALL_ACTION_UNSPECIFIED"
],
"reasons": [
"PACKAGE_FIREWALL_REASON_UNSPECIFIED"
]
}
],
"restricted_license_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"restricted_licenses": [
"<string>"
]
},
"policy": {
"auto_enable": true,
"auto_update": true
},
"sast": {
"enable_code_snippet_storage": true,
"enable_semgrep": true
},
"urgent_notification": {
"email_addresses": [
"<string>"
],
"enable_urgent_notification": true,
"slack_webhook_url": "<string>",
"urgent_notification_threshold": "URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED"
}
},
"tenant_meta": {}
},
"request": {
"force": true,
"update_mask": "<string>"
}
}
'import requests
url = "https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config"
payload = {
"object": {
"propagate": True,
"spec": {
"ai": { "code_segment_processing": True },
"analytics": {
"cvss_version": "CVSS_VERSION_UNSPECIFIED",
"enable_finding_prioritization": True,
"enable_version_upgrade_prioritization": True
},
"artifactory": { "enable_streaming": True },
"cloud_deployment": { "nat_network_requests": True },
"endor_ignore": {
"custom_file_names": ["<string>"],
"enable": True
},
"finding_prioritization": { "factors": {} },
"logging": {
"enable_remote_logging": True,
"remote_ep": "<string>",
"remote_log_level": "LOG_LEVEL_UNSPECIFIED"
},
"package_firewall": {
"cvss_severity_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"cvss_severity_threshold": "CVSS_SEVERITY_LEVEL_UNSPECIFIED",
"exceptions": [
{
"ecosystem": "ECOSYSTEM_UNSPECIFIED",
"package_name": "<string>",
"exact_versions": ["<string>"],
"version_ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
],
"malware_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_hours": 123,
"notification_rules": [
{
"name": "<string>",
"notification_target_uuids": ["<string>"],
"on_actions": ["PACKAGE_FIREWALL_ACTION_UNSPECIFIED"],
"reasons": ["PACKAGE_FIREWALL_REASON_UNSPECIFIED"]
}
],
"restricted_license_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"restricted_licenses": ["<string>"]
},
"policy": {
"auto_enable": True,
"auto_update": True
},
"sast": {
"enable_code_snippet_storage": True,
"enable_semgrep": True
},
"urgent_notification": {
"email_addresses": ["<string>"],
"enable_urgent_notification": True,
"slack_webhook_url": "<string>",
"urgent_notification_threshold": "URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED"
}
},
"tenant_meta": {}
},
"request": {
"force": True,
"update_mask": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
object: {
propagate: true,
spec: {
ai: {code_segment_processing: true},
analytics: {
cvss_version: 'CVSS_VERSION_UNSPECIFIED',
enable_finding_prioritization: true,
enable_version_upgrade_prioritization: true
},
artifactory: {enable_streaming: true},
cloud_deployment: {nat_network_requests: true},
endor_ignore: {custom_file_names: ['<string>'], enable: true},
finding_prioritization: {factors: {}},
logging: {
enable_remote_logging: true,
remote_ep: '<string>',
remote_log_level: 'LOG_LEVEL_UNSPECIFIED'
},
package_firewall: {
cvss_severity_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
cvss_severity_threshold: 'CVSS_SEVERITY_LEVEL_UNSPECIFIED',
exceptions: [
{
ecosystem: 'ECOSYSTEM_UNSPECIFIED',
package_name: '<string>',
exact_versions: ['<string>'],
version_ranges: [{end: '<string>', start: '<string>'}]
}
],
malware_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
min_age_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
min_age_hours: 123,
notification_rules: [
{
name: '<string>',
notification_target_uuids: ['<string>'],
on_actions: ['PACKAGE_FIREWALL_ACTION_UNSPECIFIED'],
reasons: ['PACKAGE_FIREWALL_REASON_UNSPECIFIED']
}
],
restricted_license_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
restricted_licenses: ['<string>']
},
policy: {auto_enable: true, auto_update: true},
sast: {enable_code_snippet_storage: true, enable_semgrep: true},
urgent_notification: {
email_addresses: ['<string>'],
enable_urgent_notification: true,
slack_webhook_url: '<string>',
urgent_notification_threshold: 'URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED'
}
},
tenant_meta: {}
},
request: {force: true, update_mask: '<string>'}
})
};
fetch('https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config', 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/{object.tenant_meta.namespace}/system-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'object' => [
'propagate' => true,
'spec' => [
'ai' => [
'code_segment_processing' => true
],
'analytics' => [
'cvss_version' => 'CVSS_VERSION_UNSPECIFIED',
'enable_finding_prioritization' => true,
'enable_version_upgrade_prioritization' => true
],
'artifactory' => [
'enable_streaming' => true
],
'cloud_deployment' => [
'nat_network_requests' => true
],
'endor_ignore' => [
'custom_file_names' => [
'<string>'
],
'enable' => true
],
'finding_prioritization' => [
'factors' => [
]
],
'logging' => [
'enable_remote_logging' => true,
'remote_ep' => '<string>',
'remote_log_level' => 'LOG_LEVEL_UNSPECIFIED'
],
'package_firewall' => [
'cvss_severity_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'cvss_severity_threshold' => 'CVSS_SEVERITY_LEVEL_UNSPECIFIED',
'exceptions' => [
[
'ecosystem' => 'ECOSYSTEM_UNSPECIFIED',
'package_name' => '<string>',
'exact_versions' => [
'<string>'
],
'version_ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
]
],
'malware_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'min_age_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'min_age_hours' => 123,
'notification_rules' => [
[
'name' => '<string>',
'notification_target_uuids' => [
'<string>'
],
'on_actions' => [
'PACKAGE_FIREWALL_ACTION_UNSPECIFIED'
],
'reasons' => [
'PACKAGE_FIREWALL_REASON_UNSPECIFIED'
]
]
],
'restricted_license_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'restricted_licenses' => [
'<string>'
]
],
'policy' => [
'auto_enable' => true,
'auto_update' => true
],
'sast' => [
'enable_code_snippet_storage' => true,
'enable_semgrep' => true
],
'urgent_notification' => [
'email_addresses' => [
'<string>'
],
'enable_urgent_notification' => true,
'slack_webhook_url' => '<string>',
'urgent_notification_threshold' => 'URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED'
]
],
'tenant_meta' => [
]
],
'request' => [
'force' => true,
'update_mask' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config"
payload := strings.NewReader("{\n \"object\": {\n \"propagate\": true,\n \"spec\": {\n \"ai\": {\n \"code_segment_processing\": true\n },\n \"analytics\": {\n \"cvss_version\": \"CVSS_VERSION_UNSPECIFIED\",\n \"enable_finding_prioritization\": true,\n \"enable_version_upgrade_prioritization\": true\n },\n \"artifactory\": {\n \"enable_streaming\": true\n },\n \"cloud_deployment\": {\n \"nat_network_requests\": true\n },\n \"endor_ignore\": {\n \"custom_file_names\": [\n \"<string>\"\n ],\n \"enable\": true\n },\n \"finding_prioritization\": {\n \"factors\": {}\n },\n \"logging\": {\n \"enable_remote_logging\": true,\n \"remote_ep\": \"<string>\",\n \"remote_log_level\": \"LOG_LEVEL_UNSPECIFIED\"\n },\n \"package_firewall\": {\n \"cvss_severity_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"cvss_severity_threshold\": \"CVSS_SEVERITY_LEVEL_UNSPECIFIED\",\n \"exceptions\": [\n {\n \"ecosystem\": \"ECOSYSTEM_UNSPECIFIED\",\n \"package_name\": \"<string>\",\n \"exact_versions\": [\n \"<string>\"\n ],\n \"version_ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n ],\n \"malware_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_hours\": 123,\n \"notification_rules\": [\n {\n \"name\": \"<string>\",\n \"notification_target_uuids\": [\n \"<string>\"\n ],\n \"on_actions\": [\n \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\"\n ],\n \"reasons\": [\n \"PACKAGE_FIREWALL_REASON_UNSPECIFIED\"\n ]\n }\n ],\n \"restricted_license_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"restricted_licenses\": [\n \"<string>\"\n ]\n },\n \"policy\": {\n \"auto_enable\": true,\n \"auto_update\": true\n },\n \"sast\": {\n \"enable_code_snippet_storage\": true,\n \"enable_semgrep\": true\n },\n \"urgent_notification\": {\n \"email_addresses\": [\n \"<string>\"\n ],\n \"enable_urgent_notification\": true,\n \"slack_webhook_url\": \"<string>\",\n \"urgent_notification_threshold\": \"URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED\"\n }\n },\n \"tenant_meta\": {}\n },\n \"request\": {\n \"force\": true,\n \"update_mask\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config")
.header("Content-Type", "application/json")
.body("{\n \"object\": {\n \"propagate\": true,\n \"spec\": {\n \"ai\": {\n \"code_segment_processing\": true\n },\n \"analytics\": {\n \"cvss_version\": \"CVSS_VERSION_UNSPECIFIED\",\n \"enable_finding_prioritization\": true,\n \"enable_version_upgrade_prioritization\": true\n },\n \"artifactory\": {\n \"enable_streaming\": true\n },\n \"cloud_deployment\": {\n \"nat_network_requests\": true\n },\n \"endor_ignore\": {\n \"custom_file_names\": [\n \"<string>\"\n ],\n \"enable\": true\n },\n \"finding_prioritization\": {\n \"factors\": {}\n },\n \"logging\": {\n \"enable_remote_logging\": true,\n \"remote_ep\": \"<string>\",\n \"remote_log_level\": \"LOG_LEVEL_UNSPECIFIED\"\n },\n \"package_firewall\": {\n \"cvss_severity_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"cvss_severity_threshold\": \"CVSS_SEVERITY_LEVEL_UNSPECIFIED\",\n \"exceptions\": [\n {\n \"ecosystem\": \"ECOSYSTEM_UNSPECIFIED\",\n \"package_name\": \"<string>\",\n \"exact_versions\": [\n \"<string>\"\n ],\n \"version_ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n ],\n \"malware_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_hours\": 123,\n \"notification_rules\": [\n {\n \"name\": \"<string>\",\n \"notification_target_uuids\": [\n \"<string>\"\n ],\n \"on_actions\": [\n \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\"\n ],\n \"reasons\": [\n \"PACKAGE_FIREWALL_REASON_UNSPECIFIED\"\n ]\n }\n ],\n \"restricted_license_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"restricted_licenses\": [\n \"<string>\"\n ]\n },\n \"policy\": {\n \"auto_enable\": true,\n \"auto_update\": true\n },\n \"sast\": {\n \"enable_code_snippet_storage\": true,\n \"enable_semgrep\": true\n },\n \"urgent_notification\": {\n \"email_addresses\": [\n \"<string>\"\n ],\n \"enable_urgent_notification\": true,\n \"slack_webhook_url\": \"<string>\",\n \"urgent_notification_threshold\": \"URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED\"\n }\n },\n \"tenant_meta\": {}\n },\n \"request\": {\n \"force\": true,\n \"update_mask\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"object\": {\n \"propagate\": true,\n \"spec\": {\n \"ai\": {\n \"code_segment_processing\": true\n },\n \"analytics\": {\n \"cvss_version\": \"CVSS_VERSION_UNSPECIFIED\",\n \"enable_finding_prioritization\": true,\n \"enable_version_upgrade_prioritization\": true\n },\n \"artifactory\": {\n \"enable_streaming\": true\n },\n \"cloud_deployment\": {\n \"nat_network_requests\": true\n },\n \"endor_ignore\": {\n \"custom_file_names\": [\n \"<string>\"\n ],\n \"enable\": true\n },\n \"finding_prioritization\": {\n \"factors\": {}\n },\n \"logging\": {\n \"enable_remote_logging\": true,\n \"remote_ep\": \"<string>\",\n \"remote_log_level\": \"LOG_LEVEL_UNSPECIFIED\"\n },\n \"package_firewall\": {\n \"cvss_severity_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"cvss_severity_threshold\": \"CVSS_SEVERITY_LEVEL_UNSPECIFIED\",\n \"exceptions\": [\n {\n \"ecosystem\": \"ECOSYSTEM_UNSPECIFIED\",\n \"package_name\": \"<string>\",\n \"exact_versions\": [\n \"<string>\"\n ],\n \"version_ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n ],\n \"malware_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_hours\": 123,\n \"notification_rules\": [\n {\n \"name\": \"<string>\",\n \"notification_target_uuids\": [\n \"<string>\"\n ],\n \"on_actions\": [\n \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\"\n ],\n \"reasons\": [\n \"PACKAGE_FIREWALL_REASON_UNSPECIFIED\"\n ]\n }\n ],\n \"restricted_license_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"restricted_licenses\": [\n \"<string>\"\n ]\n },\n \"policy\": {\n \"auto_enable\": true,\n \"auto_update\": true\n },\n \"sast\": {\n \"enable_code_snippet_storage\": true,\n \"enable_semgrep\": true\n },\n \"urgent_notification\": {\n \"email_addresses\": [\n \"<string>\"\n ],\n \"enable_urgent_notification\": true,\n \"slack_webhook_url\": \"<string>\",\n \"urgent_notification_threshold\": \"URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED\"\n }\n },\n \"tenant_meta\": {}\n },\n \"request\": {\n \"force\": true,\n \"update_mask\": \"<string>\"\n }\n}"
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>"
},
"spec": {
"ai": {
"code_segment_processing": true
},
"analytics": {
"cvss_version": "CVSS_VERSION_UNSPECIFIED",
"enable_finding_prioritization": true,
"enable_version_upgrade_prioritization": true
},
"artifactory": {
"enable_streaming": true
},
"cloud_deployment": {
"nat_network_requests": true
},
"endor_ignore": {
"custom_file_names": [
"<string>"
],
"enable": true
},
"finding_prioritization": {
"factors": {}
},
"logging": {
"enable_remote_logging": true,
"remote_ep": "<string>",
"remote_log_level": "LOG_LEVEL_UNSPECIFIED"
},
"package_firewall": {
"cvss_severity_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"cvss_severity_threshold": "CVSS_SEVERITY_LEVEL_UNSPECIFIED",
"exceptions": [
{
"ecosystem": "ECOSYSTEM_UNSPECIFIED",
"package_name": "<string>",
"exact_versions": [
"<string>"
],
"version_ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
],
"malware_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_hours": 123,
"notification_rules": [
{
"name": "<string>",
"notification_target_uuids": [
"<string>"
],
"on_actions": [
"PACKAGE_FIREWALL_ACTION_UNSPECIFIED"
],
"reasons": [
"PACKAGE_FIREWALL_REASON_UNSPECIFIED"
]
}
],
"restricted_license_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"restricted_licenses": [
"<string>"
]
},
"policy": {
"auto_enable": true,
"auto_update": true
},
"sast": {
"enable_code_snippet_storage": true,
"enable_semgrep": true
},
"urgent_notification": {
"email_addresses": [
"<string>"
],
"enable_urgent_notification": true,
"slack_webhook_url": "<string>",
"urgent_notification_threshold": "URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED"
}
},
"propagate": true,
"tenant_meta": {
"namespace": "<string>"
},
"uuid": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Path Parameters
Namespaces are a way to organize organizational units into virtual groupings of resources. Namespaces must be a fully qualified name, for example, the child namespace of namespace "endor.prod" called "app" is called "endor.prod.app".
Body
application/json
Response
A successful response.
SystemConfig represents the system configuration for a tenant.
Common fields for all Endor Labs resources.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Indicates that the object should be visible in child namespaces.
Tenant related data for the tenant containing the resource.
Show child attributes
Show child attributes
The UUID of the system configuration.
Was this page helpful?
⌘I
UpdateSystemConfig
curl --request PATCH \
--url https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config \
--header 'Content-Type: application/json' \
--data '
{
"object": {
"propagate": true,
"spec": {
"ai": {
"code_segment_processing": true
},
"analytics": {
"cvss_version": "CVSS_VERSION_UNSPECIFIED",
"enable_finding_prioritization": true,
"enable_version_upgrade_prioritization": true
},
"artifactory": {
"enable_streaming": true
},
"cloud_deployment": {
"nat_network_requests": true
},
"endor_ignore": {
"custom_file_names": [
"<string>"
],
"enable": true
},
"finding_prioritization": {
"factors": {}
},
"logging": {
"enable_remote_logging": true,
"remote_ep": "<string>",
"remote_log_level": "LOG_LEVEL_UNSPECIFIED"
},
"package_firewall": {
"cvss_severity_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"cvss_severity_threshold": "CVSS_SEVERITY_LEVEL_UNSPECIFIED",
"exceptions": [
{
"ecosystem": "ECOSYSTEM_UNSPECIFIED",
"package_name": "<string>",
"exact_versions": [
"<string>"
],
"version_ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
],
"malware_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_hours": 123,
"notification_rules": [
{
"name": "<string>",
"notification_target_uuids": [
"<string>"
],
"on_actions": [
"PACKAGE_FIREWALL_ACTION_UNSPECIFIED"
],
"reasons": [
"PACKAGE_FIREWALL_REASON_UNSPECIFIED"
]
}
],
"restricted_license_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"restricted_licenses": [
"<string>"
]
},
"policy": {
"auto_enable": true,
"auto_update": true
},
"sast": {
"enable_code_snippet_storage": true,
"enable_semgrep": true
},
"urgent_notification": {
"email_addresses": [
"<string>"
],
"enable_urgent_notification": true,
"slack_webhook_url": "<string>",
"urgent_notification_threshold": "URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED"
}
},
"tenant_meta": {}
},
"request": {
"force": true,
"update_mask": "<string>"
}
}
'import requests
url = "https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config"
payload = {
"object": {
"propagate": True,
"spec": {
"ai": { "code_segment_processing": True },
"analytics": {
"cvss_version": "CVSS_VERSION_UNSPECIFIED",
"enable_finding_prioritization": True,
"enable_version_upgrade_prioritization": True
},
"artifactory": { "enable_streaming": True },
"cloud_deployment": { "nat_network_requests": True },
"endor_ignore": {
"custom_file_names": ["<string>"],
"enable": True
},
"finding_prioritization": { "factors": {} },
"logging": {
"enable_remote_logging": True,
"remote_ep": "<string>",
"remote_log_level": "LOG_LEVEL_UNSPECIFIED"
},
"package_firewall": {
"cvss_severity_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"cvss_severity_threshold": "CVSS_SEVERITY_LEVEL_UNSPECIFIED",
"exceptions": [
{
"ecosystem": "ECOSYSTEM_UNSPECIFIED",
"package_name": "<string>",
"exact_versions": ["<string>"],
"version_ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
],
"malware_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_hours": 123,
"notification_rules": [
{
"name": "<string>",
"notification_target_uuids": ["<string>"],
"on_actions": ["PACKAGE_FIREWALL_ACTION_UNSPECIFIED"],
"reasons": ["PACKAGE_FIREWALL_REASON_UNSPECIFIED"]
}
],
"restricted_license_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"restricted_licenses": ["<string>"]
},
"policy": {
"auto_enable": True,
"auto_update": True
},
"sast": {
"enable_code_snippet_storage": True,
"enable_semgrep": True
},
"urgent_notification": {
"email_addresses": ["<string>"],
"enable_urgent_notification": True,
"slack_webhook_url": "<string>",
"urgent_notification_threshold": "URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED"
}
},
"tenant_meta": {}
},
"request": {
"force": True,
"update_mask": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
object: {
propagate: true,
spec: {
ai: {code_segment_processing: true},
analytics: {
cvss_version: 'CVSS_VERSION_UNSPECIFIED',
enable_finding_prioritization: true,
enable_version_upgrade_prioritization: true
},
artifactory: {enable_streaming: true},
cloud_deployment: {nat_network_requests: true},
endor_ignore: {custom_file_names: ['<string>'], enable: true},
finding_prioritization: {factors: {}},
logging: {
enable_remote_logging: true,
remote_ep: '<string>',
remote_log_level: 'LOG_LEVEL_UNSPECIFIED'
},
package_firewall: {
cvss_severity_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
cvss_severity_threshold: 'CVSS_SEVERITY_LEVEL_UNSPECIFIED',
exceptions: [
{
ecosystem: 'ECOSYSTEM_UNSPECIFIED',
package_name: '<string>',
exact_versions: ['<string>'],
version_ranges: [{end: '<string>', start: '<string>'}]
}
],
malware_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
min_age_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
min_age_hours: 123,
notification_rules: [
{
name: '<string>',
notification_target_uuids: ['<string>'],
on_actions: ['PACKAGE_FIREWALL_ACTION_UNSPECIFIED'],
reasons: ['PACKAGE_FIREWALL_REASON_UNSPECIFIED']
}
],
restricted_license_action: 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
restricted_licenses: ['<string>']
},
policy: {auto_enable: true, auto_update: true},
sast: {enable_code_snippet_storage: true, enable_semgrep: true},
urgent_notification: {
email_addresses: ['<string>'],
enable_urgent_notification: true,
slack_webhook_url: '<string>',
urgent_notification_threshold: 'URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED'
}
},
tenant_meta: {}
},
request: {force: true, update_mask: '<string>'}
})
};
fetch('https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config', 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/{object.tenant_meta.namespace}/system-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'object' => [
'propagate' => true,
'spec' => [
'ai' => [
'code_segment_processing' => true
],
'analytics' => [
'cvss_version' => 'CVSS_VERSION_UNSPECIFIED',
'enable_finding_prioritization' => true,
'enable_version_upgrade_prioritization' => true
],
'artifactory' => [
'enable_streaming' => true
],
'cloud_deployment' => [
'nat_network_requests' => true
],
'endor_ignore' => [
'custom_file_names' => [
'<string>'
],
'enable' => true
],
'finding_prioritization' => [
'factors' => [
]
],
'logging' => [
'enable_remote_logging' => true,
'remote_ep' => '<string>',
'remote_log_level' => 'LOG_LEVEL_UNSPECIFIED'
],
'package_firewall' => [
'cvss_severity_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'cvss_severity_threshold' => 'CVSS_SEVERITY_LEVEL_UNSPECIFIED',
'exceptions' => [
[
'ecosystem' => 'ECOSYSTEM_UNSPECIFIED',
'package_name' => '<string>',
'exact_versions' => [
'<string>'
],
'version_ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
]
],
'malware_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'min_age_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'min_age_hours' => 123,
'notification_rules' => [
[
'name' => '<string>',
'notification_target_uuids' => [
'<string>'
],
'on_actions' => [
'PACKAGE_FIREWALL_ACTION_UNSPECIFIED'
],
'reasons' => [
'PACKAGE_FIREWALL_REASON_UNSPECIFIED'
]
]
],
'restricted_license_action' => 'PACKAGE_FIREWALL_ACTION_UNSPECIFIED',
'restricted_licenses' => [
'<string>'
]
],
'policy' => [
'auto_enable' => true,
'auto_update' => true
],
'sast' => [
'enable_code_snippet_storage' => true,
'enable_semgrep' => true
],
'urgent_notification' => [
'email_addresses' => [
'<string>'
],
'enable_urgent_notification' => true,
'slack_webhook_url' => '<string>',
'urgent_notification_threshold' => 'URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED'
]
],
'tenant_meta' => [
]
],
'request' => [
'force' => true,
'update_mask' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config"
payload := strings.NewReader("{\n \"object\": {\n \"propagate\": true,\n \"spec\": {\n \"ai\": {\n \"code_segment_processing\": true\n },\n \"analytics\": {\n \"cvss_version\": \"CVSS_VERSION_UNSPECIFIED\",\n \"enable_finding_prioritization\": true,\n \"enable_version_upgrade_prioritization\": true\n },\n \"artifactory\": {\n \"enable_streaming\": true\n },\n \"cloud_deployment\": {\n \"nat_network_requests\": true\n },\n \"endor_ignore\": {\n \"custom_file_names\": [\n \"<string>\"\n ],\n \"enable\": true\n },\n \"finding_prioritization\": {\n \"factors\": {}\n },\n \"logging\": {\n \"enable_remote_logging\": true,\n \"remote_ep\": \"<string>\",\n \"remote_log_level\": \"LOG_LEVEL_UNSPECIFIED\"\n },\n \"package_firewall\": {\n \"cvss_severity_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"cvss_severity_threshold\": \"CVSS_SEVERITY_LEVEL_UNSPECIFIED\",\n \"exceptions\": [\n {\n \"ecosystem\": \"ECOSYSTEM_UNSPECIFIED\",\n \"package_name\": \"<string>\",\n \"exact_versions\": [\n \"<string>\"\n ],\n \"version_ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n ],\n \"malware_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_hours\": 123,\n \"notification_rules\": [\n {\n \"name\": \"<string>\",\n \"notification_target_uuids\": [\n \"<string>\"\n ],\n \"on_actions\": [\n \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\"\n ],\n \"reasons\": [\n \"PACKAGE_FIREWALL_REASON_UNSPECIFIED\"\n ]\n }\n ],\n \"restricted_license_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"restricted_licenses\": [\n \"<string>\"\n ]\n },\n \"policy\": {\n \"auto_enable\": true,\n \"auto_update\": true\n },\n \"sast\": {\n \"enable_code_snippet_storage\": true,\n \"enable_semgrep\": true\n },\n \"urgent_notification\": {\n \"email_addresses\": [\n \"<string>\"\n ],\n \"enable_urgent_notification\": true,\n \"slack_webhook_url\": \"<string>\",\n \"urgent_notification_threshold\": \"URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED\"\n }\n },\n \"tenant_meta\": {}\n },\n \"request\": {\n \"force\": true,\n \"update_mask\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config")
.header("Content-Type", "application/json")
.body("{\n \"object\": {\n \"propagate\": true,\n \"spec\": {\n \"ai\": {\n \"code_segment_processing\": true\n },\n \"analytics\": {\n \"cvss_version\": \"CVSS_VERSION_UNSPECIFIED\",\n \"enable_finding_prioritization\": true,\n \"enable_version_upgrade_prioritization\": true\n },\n \"artifactory\": {\n \"enable_streaming\": true\n },\n \"cloud_deployment\": {\n \"nat_network_requests\": true\n },\n \"endor_ignore\": {\n \"custom_file_names\": [\n \"<string>\"\n ],\n \"enable\": true\n },\n \"finding_prioritization\": {\n \"factors\": {}\n },\n \"logging\": {\n \"enable_remote_logging\": true,\n \"remote_ep\": \"<string>\",\n \"remote_log_level\": \"LOG_LEVEL_UNSPECIFIED\"\n },\n \"package_firewall\": {\n \"cvss_severity_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"cvss_severity_threshold\": \"CVSS_SEVERITY_LEVEL_UNSPECIFIED\",\n \"exceptions\": [\n {\n \"ecosystem\": \"ECOSYSTEM_UNSPECIFIED\",\n \"package_name\": \"<string>\",\n \"exact_versions\": [\n \"<string>\"\n ],\n \"version_ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n ],\n \"malware_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_hours\": 123,\n \"notification_rules\": [\n {\n \"name\": \"<string>\",\n \"notification_target_uuids\": [\n \"<string>\"\n ],\n \"on_actions\": [\n \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\"\n ],\n \"reasons\": [\n \"PACKAGE_FIREWALL_REASON_UNSPECIFIED\"\n ]\n }\n ],\n \"restricted_license_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"restricted_licenses\": [\n \"<string>\"\n ]\n },\n \"policy\": {\n \"auto_enable\": true,\n \"auto_update\": true\n },\n \"sast\": {\n \"enable_code_snippet_storage\": true,\n \"enable_semgrep\": true\n },\n \"urgent_notification\": {\n \"email_addresses\": [\n \"<string>\"\n ],\n \"enable_urgent_notification\": true,\n \"slack_webhook_url\": \"<string>\",\n \"urgent_notification_threshold\": \"URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED\"\n }\n },\n \"tenant_meta\": {}\n },\n \"request\": {\n \"force\": true,\n \"update_mask\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/namespaces/{object.tenant_meta.namespace}/system-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"object\": {\n \"propagate\": true,\n \"spec\": {\n \"ai\": {\n \"code_segment_processing\": true\n },\n \"analytics\": {\n \"cvss_version\": \"CVSS_VERSION_UNSPECIFIED\",\n \"enable_finding_prioritization\": true,\n \"enable_version_upgrade_prioritization\": true\n },\n \"artifactory\": {\n \"enable_streaming\": true\n },\n \"cloud_deployment\": {\n \"nat_network_requests\": true\n },\n \"endor_ignore\": {\n \"custom_file_names\": [\n \"<string>\"\n ],\n \"enable\": true\n },\n \"finding_prioritization\": {\n \"factors\": {}\n },\n \"logging\": {\n \"enable_remote_logging\": true,\n \"remote_ep\": \"<string>\",\n \"remote_log_level\": \"LOG_LEVEL_UNSPECIFIED\"\n },\n \"package_firewall\": {\n \"cvss_severity_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"cvss_severity_threshold\": \"CVSS_SEVERITY_LEVEL_UNSPECIFIED\",\n \"exceptions\": [\n {\n \"ecosystem\": \"ECOSYSTEM_UNSPECIFIED\",\n \"package_name\": \"<string>\",\n \"exact_versions\": [\n \"<string>\"\n ],\n \"version_ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n ],\n \"malware_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"min_age_hours\": 123,\n \"notification_rules\": [\n {\n \"name\": \"<string>\",\n \"notification_target_uuids\": [\n \"<string>\"\n ],\n \"on_actions\": [\n \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\"\n ],\n \"reasons\": [\n \"PACKAGE_FIREWALL_REASON_UNSPECIFIED\"\n ]\n }\n ],\n \"restricted_license_action\": \"PACKAGE_FIREWALL_ACTION_UNSPECIFIED\",\n \"restricted_licenses\": [\n \"<string>\"\n ]\n },\n \"policy\": {\n \"auto_enable\": true,\n \"auto_update\": true\n },\n \"sast\": {\n \"enable_code_snippet_storage\": true,\n \"enable_semgrep\": true\n },\n \"urgent_notification\": {\n \"email_addresses\": [\n \"<string>\"\n ],\n \"enable_urgent_notification\": true,\n \"slack_webhook_url\": \"<string>\",\n \"urgent_notification_threshold\": \"URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED\"\n }\n },\n \"tenant_meta\": {}\n },\n \"request\": {\n \"force\": true,\n \"update_mask\": \"<string>\"\n }\n}"
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>"
},
"spec": {
"ai": {
"code_segment_processing": true
},
"analytics": {
"cvss_version": "CVSS_VERSION_UNSPECIFIED",
"enable_finding_prioritization": true,
"enable_version_upgrade_prioritization": true
},
"artifactory": {
"enable_streaming": true
},
"cloud_deployment": {
"nat_network_requests": true
},
"endor_ignore": {
"custom_file_names": [
"<string>"
],
"enable": true
},
"finding_prioritization": {
"factors": {}
},
"logging": {
"enable_remote_logging": true,
"remote_ep": "<string>",
"remote_log_level": "LOG_LEVEL_UNSPECIFIED"
},
"package_firewall": {
"cvss_severity_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"cvss_severity_threshold": "CVSS_SEVERITY_LEVEL_UNSPECIFIED",
"exceptions": [
{
"ecosystem": "ECOSYSTEM_UNSPECIFIED",
"package_name": "<string>",
"exact_versions": [
"<string>"
],
"version_ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
],
"malware_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"min_age_hours": 123,
"notification_rules": [
{
"name": "<string>",
"notification_target_uuids": [
"<string>"
],
"on_actions": [
"PACKAGE_FIREWALL_ACTION_UNSPECIFIED"
],
"reasons": [
"PACKAGE_FIREWALL_REASON_UNSPECIFIED"
]
}
],
"restricted_license_action": "PACKAGE_FIREWALL_ACTION_UNSPECIFIED",
"restricted_licenses": [
"<string>"
]
},
"policy": {
"auto_enable": true,
"auto_update": true
},
"sast": {
"enable_code_snippet_storage": true,
"enable_semgrep": true
},
"urgent_notification": {
"email_addresses": [
"<string>"
],
"enable_urgent_notification": true,
"slack_webhook_url": "<string>",
"urgent_notification_threshold": "URGENT_NOTIFICATION_THRESHOLD_UNSPECIFIED"
}
},
"propagate": true,
"tenant_meta": {
"namespace": "<string>"
},
"uuid": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}