Querying the Project-Level Open Source Governance Policy List
Function
Querying the Project-Level Open Source Governance Policy List
URI
GET /v2/{project_id}/open-source/rule-sets/query
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | No | String | Policy |
| creator_name | No | String | Policy Creator Name |
| include_tenant_rule_set | Yes | Boolean | Specifies whether the policy of the tenant to which the current project belongs is included. |
| limit | No | Integer | Pagination parameter. The default value is 15. |
| offset | No | Integer | Pagination parameter. The default value is 0. |
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 |
|---|---|---|
| total | Integer | Total number. |
| data | Array of SimpleOpenSourceRuleSetVO objects | Open Source Governance Policy List |
| Parameter | Type | Description |
|---|---|---|
| id | String | Open Source Governance Policy ID |
| name | String | Open Source Governance Policy Name |
| level | String | Open Source Governance Policy Level (tenant-tenant-level, project-project-level) |
| is_valid | Boolean | Available or Not |
| version | String | Version |
| operator | String | Operator |
| is_public | Boolean | System Policy |
| is_legacy | Boolean | Old Version or Not |
| operate_time | Long | Operated |
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/query?name=&limit=10&offset=0&include_tenant_rule_set=false Example Responses
Status code: 200
OK
{
"data" : [ {
"id" : "60eab9fd2b144f619a3563b2e0036a61",
"name" : "Creating an Open Source Governance Policy - 20231020154413",
"level" : "project",
"is_valid" : true,
"version" : "a108f6b1effb4b03a9505288f8801e65",
"operator" : "devcloud_xxx",
"is_public" : false,
"is_legacy" : null,
"operate_time" : 1697787881000
} ],
"total" : 1
} 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.