List Policies by Service Account


List the policies for a service account.

Operation Permissions

Applications assigned with the administrator policy in the OU.

Request Format

GET https://{apigw-address}/enos-iam-service/v2.3/policy/service/list

Request Parameters (URI)

Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

The ID of the OU to which the service account belongs to. How to get orgId>>

subjectId

Query

Required

String

The access key of the service account.

subjectType

Query

Required

String

The subject type. The only available value is app_instance.

Response Parameters

Name

Data Type

Description

data

Array of Policy Structs

The list of policies. For more information, see Policy Struct.

Samples

Request Sample

url: https://{apigw-address}/enos-iam-service/v2.3/policy/service/list?orgId=yourOrgId&subjectType=app_instance&subjectId=yourAccessKey
method: GET

Return Sample

{
  "fail": false,
  "data": [
    {
      "id": "1",
      "code": "admin",
      "desc": "administrator",
      "name": "administrator",
      "type": 1,
      "created_by": "",
      "permissions": {},
      "updated_at": null
    },
    {
      "id": "198",
      "code": "connectivity.admin",
      "desc": "Device Management Administrator",
      "name": "Device Management Administrator",
      "type": 2,
      "created_by": "system",
      "permissions": {},
      "updated_at": null
    }
  ],
  "success": true,
  "status": 0
}