Updated on 2025-12-01 GMT+08:00

Querying Governance Policy Details

Function

This API is used to query governance policy details.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    cse:policy:get

    read

    -

    -

    -

    -

URI

GET /v3/{project_id}/govern/governance/{kind}/{policy_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which must be unique. The value contains 1 to 64 characters.

kind

Yes

String

Governance policy kind.

policy_id

Yes

String

Governance policy ID.

Request

Table 2 Request header parameters

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.

x-environment

No

String

Environment.

Response

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

name

String

Governance policy name.

selector

GovSelector object

Governance policy delivery scope.

spec

Object

Governance policy definition content.

Table 4 GovSelector

Parameter

Type

Description

environment

String

Environment.

app

String

Application.

service

String

Optional. Governance is delivered to a microservice.

Status code: 400

Table 5 Response body parameters

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/{kind}/{policy_id}

Example Response

Status code: 200

Response structure for querying governance policy details.

{
  "name" : "string",
  "selector" : {
    "environment" : "string",
    "app" : "string",
    "service" : "string"
  },
  "spec" : { }
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

See Error Codes.