--- title: "Get role" slug: "management-subaccount-getrole" tags: ["Sub Account"] updated: 2026-09-17T10:05:32Z published: 2026-09-17T10:05:32Z canonical: "api.ncloud-docs.com/management-subaccount-getrole" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Get role Available in Classic and VPC Get a role. ## Request This section describes the request format. The method and URI are as follows: | Method | URI | | --- | --- | | GET | /api/v1/roles/{roleNo} | ### Request headers For information about the headers common to all Sub Account APIs, see [Sub Account request headers](/docs/en/management-subaccount#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94). ### Request path parameters You can use the following path parameters with your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `roleNo` | String | Required | Role ID - See [Get role list](/docs/en/management-subaccount-getroles) | ### Request example The request example is as follows: ``` curl --location --request GET 'https://subaccount.apigw.ntruss.com/api/v1//roles/5d0d4d80-****-****-****-246e96591a38' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Accept: application/json' ``` ## Response This section describes the response format. ### Response body The response body includes the following data: | Field | Type | Required | Description | | --- | --- | --- | --- | | `nrn` | String | - | NAVER Cloud Platform resource identification value for role | | `roleNo` | String | - | Role ID | | `roleName` | String | - | Role name | | `roleType` | String | - | Role type - `Server` \| `Account` \| `Service` - `Server`: It is assigned to the server resource in the VPC environment. You can access services and resources without an access key - `Account`: Assign portal and console access permissions for the main account to the sub account. Role switching allows access to the target account's resources - `Service`: It is assigned to the service. You can access resources of other services | | `sessionExpirationSec` | Integer | - | Session expiration time (second) - `600` \| `1800` \| `3600` \| `10800` | | `descCont` | String | - | Description of the role | | `active` | Boolean | - | Role status - `true` \| `false` - `true`: enabled - `false`: disabled | | `createTime` | String | - | Role creation date and time - ISO 8601 format | | `modifiedTime` | String | - | Last modification date and time of the role - ISO 8601 format | | `lastUseTime` | String | - | Last usage date and time of the role - ISO 8601 format | | `policies` | Array | - | List of policies assigned to role: [policies](/docs/en/management-subaccount-getrole#policies) | | `entities` | Array | - | List of targets applied with role: [entities](/docs/en/management-subaccount-getrole#entities) | #### `policies` The following describes `policies`. | Field | Type | Required | Description | | --- | --- | --- | --- | | `policyId` | String | - | Policy ID | | `policyName` | String | - | Policy Name | | `policyType` | String | - | Policy type - `SYSTEM_MANAGED` \| `USER_CREATED` - `SYSTEM_MANAGED`: System Managed Policies - `USER_CREATED`: User Created Policies | | `policyDesc` | String | - | Policy description | | `nrn` | String | - | NAVER Cloud Platform resource identification value for policy | #### `entities` The following describes `entities`. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | String | - | Role application target ID | | `type` | String | - | Role application target type - `Server` \| `Account` \| `Service` - `Server`: server in VPC environment - `Account`: account - `Service`: service | | `entityType` | String | - | Role application target type - `Server` \| `Account` \| `Service` - `Server`: server in VPC environment - `Account`: account - `Service`: service | | `entityId` | Integer | - | Role application target ID | Note Note that the `entityType` and `entityId` are scheduled to be discontinued in the future. ### Response status codes For information about the HTTP status codes common to all Sub Account APIs, see [Sub Account status codes](/docs/en/management-subaccount#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C). ### Response example The response example is as follows: ``` { "nrn": "nrn:PUB:IAM::*******:Role/5d0d4d80-****-****-****-246e96591a38", "roleNo": "5d0d4d80-****-****-****-246e96591a38", "roleName": "role002", "roleType": "Account", "sessionExpirationSec": 600, "descCont": "Role description", "active": true, "createTime": "2024-12-12T23:32:34Z", "modifiedTime": "2024-12-26T08:29:30Z", "lastUseTime": "2025-01-02T01:26:02Z", "policies": [ { "policyId": "7938a9f0-****-****-****-005056a7ecf2", "policyName": "policy010", "policyType": "USER_CREATED", "policyDesc": "policy", "nrn": "nrn:PUB:IAM::*******:Policy/7938a9f0-****-****-****-005056a7ecf2" } ], "entities": [ { "id": "*******", "type": "Account", "entityType": "Account", "entityId": ******* } ] } ```