Querying Details About a Project-Level Open Source Governance Policy
Function
Querying Details About a Project-Level Open Source Governance Policy
URI
GET /v2/{project_id}/open-source/rule-sets/{rule_set_id}/detail
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
rule_set_id |
Yes |
String |
Policy ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Policy ID. |
name |
String |
Policy Name |
level |
String |
Policy Level |
parent_id |
String |
Parent Policy ID |
version |
String |
Policy Versions |
is_valid |
Boolean |
Enable Configuration |
is_public |
Boolean |
Indicates whether the policy is a system-level policy. |
creator |
String |
Created By |
create_time |
String |
Created |
updater |
String |
User who updated the data |
update_time |
String |
Updated |
content |
OpenSourceRuleContent object |
Policy Rule Details |
Parameter |
Type |
Description |
---|---|---|
version_set |
VersionSetProperty object |
Open-source dependencies |
security |
SecurityProperty object |
Vulnerability |
license |
LicenseProperty object |
License |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Enable Configuration |
rules |
Array of VersionSetRule objects |
Rule list. |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Health Check |
ecosystem |
String |
Dependency Degree |
package_name |
String |
Package name |
package_version |
String |
Package Version |
description |
String |
Rules |
predicate |
String |
Comparison Rule |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Enable Configuration |
rules |
SecurityRule object |
Rule Details |
Parameter |
Type |
Description |
---|---|---|
severity |
severity object |
Severity |
cve |
cve object |
Vulnerability ID |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Enable Configuration |
values |
Array of strings |
Severity |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Enable Configuration |
values |
Array of strings |
Vulnerability ID |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Health Check |
rules |
Array of rules objects |
Rule list. |
Parameter |
Type |
Description |
---|---|---|
values |
Array of strings |
License Details |
predicate |
String |
Comparison Rule |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error Message |
error_code |
String |
Error code. |
Example Requests
GET https://{endpoint}/v2/d80a8a6530324b7bac972cbb8a9f28ec/open-source/rule-sets/60eab9fd2b144f619a3563b2e0036a61/detail
Example Responses
Status code: 200
OK
{ "id" : "60eab9fd2b144f619a3563b2e0036a61", "name" : "Creating an Open Source Governance Policy - 20231020154413", "level" : "project", "version" : "a108f6b1effb4b03a9505288f8801e65", "is_valid" : true, "is_public" : false, "creator" : "847a5317086c41798469d0868535943a", "create_time" : "2023-10-20T15:44:41", "updater" : "847a5317086c41798469d0868535943a", "update_time" : "2023-10-20T15:44:41", "content" : { "version_set" : { "enable" : true, "rules" : [ { "enable" : true, "ecosystem" : "Maven", "package_name" : "springboot", "package_version" : "2.5", "description" : "", "predicate" : "eq" } ] }, "security" : { "enable" : true, "rules" : { "severity" : { "enable" : true, "values" : [ "Critical", "High", "Medium" ] }, "cve" : { "enable" : false, "values" : [ "" ] } } }, "license" : { "enable" : true, "rules" : [ { "predicate" : "contain", "values" : [ ] } ] } } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.