Querying the Governance Policy List
Function
This API is used to query the governance policy list.
URI
GET /v3/{project_id}/govern/governance/display
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which must be unique. The value contains 1 to 64 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
environment |
Yes |
String |
Environment. all indicates to query all environments. |
app |
No |
String |
Application. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Set it to application/json;charset=UTF-8. |
X-Auth-Token |
Yes |
String |
User token. |
x-engine-id |
Yes |
String |
Instance ID of an exclusive microservice engine. |
X-Enterprise-Project-ID |
Yes |
String |
Enterprise project ID. |
Response
Parameter |
Type |
Description |
---|---|---|
[Array] |
Array of GovPolicyDetail objects |
Response structure for querying the governance policy list. |
Parameter |
Type |
Description |
---|---|---|
matchGroup |
CreateBussinessScene object |
Traffic definition. |
policies |
Array of policies objects |
Governance policy definition. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Traffic name. |
status |
String |
Enabling status. Value: enabled or disabled. Default value: enabled |
selector |
GovSelector object |
Governance policy delivery scope. |
spec |
spec object |
Traffic feature description. |
Parameter |
Type |
Description |
---|---|---|
alias |
String |
Feature name. |
matches |
Array of matches objects |
Matching condition definition. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Condition name. |
apiPath |
Object |
Matched PATH. |
headers |
Object |
Matched Headers. |
method |
Array of strings |
List of matched Method. |
serviceName |
String |
Matched microservice name. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Governance policy ID. |
name |
String |
Governance policy name. |
kind |
String |
Governance kind. Value: retry, rate-limiting, loadbalance, circuit-breaker, instance-isolation, fault-injection, or bulkhead. |
status |
String |
Enabling status. Value: enabled or disabled. |
selector |
GovSelector object |
Governance policy delivery scope. |
spec |
Object |
Governance policy definition content. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Example Request
GET https://{endpoint}/v3/{project_id}/govern/governance/display
Example Response
Status code: 200
Response structure for querying the governance policy list.
[ {
"matchGroup" : {
"name" : "",
"status" : "enabled",
"selector" : {
"environment" : "string",
"app" : "string",
"service" : "string"
},
"spec" : {
"alias" : "string",
"matches" : [ {
"name" : "string",
"apiPath" : { },
"headers" : { },
"method" : [ "string" ],
"serviceName" : "string"
} ]
}
},
"policies" : [ {
"id" : "string",
"name" : "string",
"kind" : "string",
"status" : "string",
"selector" : {
"environment" : "string",
"app" : "string",
"service" : "string"
},
"spec" : { }
} ]
} ]
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot