Get sub account

Prev Next

Available in Classic and VPC

Get sub account details.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/sub-accounts/{subAccountId}

Request headers

For information about the headers common to all Sub Account APIs, see Sub Account request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
subAccountId String Required Sub account ID

Request example

The request example is as follows:

curl --location --request GET 'https://subaccount.apigw.ntruss.com/api/v1/sub-accounts/89b556d0-****-****-****-***********' \
--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
subAccountId String - Sub account ID
subAccountNo Integer - Sub account number
loginId String - Sub account login ID
name String - Sub account username
email String - Sub account user email address
needPasswordReset Boolean - Sub account login password reset notification
  • Whether to notify to change password when logging in for the first time with a sub account
  • true | false
    • true: notify
    • false: do not notify
canAPIGatewayAccess Boolean - API Gateway accessibility of the sub account
  • Whether to use APIs registered in API Gateway by creating an access key
  • true | false
    • true: available
    • false: unavailable
canConsoleAccess Boolean - Whether the sub account can access the console
  • true | false
    • true: available
    • false: unavailable
useConsolePermitIp Boolean - Whether the sub account's console access is restricted to a specific IP range
  • true | false
    • true: accessible only from the specified IP range
    • false: accessible from everywhere
consolePermitIps Array - List of IP ranges accessible to the console from the sub account
useApiAllowSource Boolean - Whether the accessible source for the API by the sub account is restricted
  • true | false
    • true: Accessible only from specified sources
    • false: Accessible from all sources
apiAllowSources Array - List of sources accessible by sub account via API
lastLoginTime String - Sub account last login date and time
  • ISO 8601 format
createTime String - Sub account creation date and time
  • ISO 8601 format
memo String - Sub account description
active Boolean - Sub account status
  • true | false
    • true: enabled
    • false: disabled
modifiedTime String - Sub account last modification date and time
  • ISO 8601 format
groups Array - Group information
policies Array - Policy information
nrn String - NAVER Cloud Platform resource identification value for sub account

apiAllowSources

The following describes apiAllowSources.

Field Type Required Description
type String - Access source type
  • IP | VPC | VPC_SERVER
    • IP: Single server IP or IP range including subnet
    • VPC: VPC in use
    • VPC_SERVER: Server in the VPC environment in use
source String - Access source information
  • IP address or instance number

groups

The following describes groups.

Field Type Required Description
groupId String - Group ID
groupName String - Group name
nrn String - NAVER Cloud Platform resource identification value for group

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

Response status codes

For information about the HTTP status codes common to all Sub Account APIs, see Sub Account status codes.

Response example

The response example is as follows:

{
    "subAccountId": "89b556d0-****-****-****-***********",
    "subAccountNo": 16***,
    "loginId": "h***",
    "name": "h***",
    "email": "l*****@*******.com",
    "needPasswordReset": false,
    "canAPIGatewayAccess": true,
    "canConsoleAccess": true,
    "useConsolePermitIp": true,
    "consolePermitIps": [
        "***.***.***.***"
    ],
    "useApiAllowSource": true,
    "apiAllowSources": [
        {
            "type": "IP",
            "source": "***.***.***.***"
        }
    ],
    "lastLoginTime": "2025-01-01T23:48:07Z",
    "createTime": "2024-09-30T04:57:47Z",
    "memo": "",
    "active": true,
    "modifiedTime": "2024-12-23T06:28:14Z",
    "groups": [
        {
            "groupId": "040164b0-****-****-****-***********",
            "groupName": "mygrp",
            "nrn": "nrn:PUB:IAM::5*****8:Group/040164b0-****-****-****-***********"
        }
    ],
    "policies": [
        {
            "policyId": "24f1aa30-****-****-****-***********",
            "policyName": "NCP_ADMINISTRATOR",
            "policyType": "SYSTEM_MANAGED",
            "policyDesc": "Permission to access the portal and console as the same as the main account",
            "nrn": "nrn:PUB:IAM:::Policy/24f1aa30-****-****-****-***********"
        }
    ],
    "nrn": "nrn:PUB:IAM::5*****8:SubAccount/89b556d0-****-****-****-***********"
}