GetResourceList

Prev Next

Available in Classic and VPC

Get the resource list.

Request

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

Method URI
POST /api/v1/resources

Request headers

For information about the headers common to all Resource Manager APIs, see Resource Manager request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
nrn String Optional NAVER Cloud Platform resource identification value
  • Use when querying a specific resource
productName String Optional Service code of the resource
regionCode String Optional Region code of the resource
resourceType String Optional Resource type
resourceId String Optional Resource ID
resourceName String Optional Resource name
tag Array Optional Resource tag information
groupName String Optional Resource group name
pageIndex Integer Optional Page number
  • 0 - N (default: 0)
pageSize Integer Optional Page output count
  • 1 - 100 (default: 20)

tag

The following describes tag.

Field Type Required Description
tagKey String Required Tag key
  • 1 - 127 characters
  • Special characters (-, _) can be used
  • Only update tag values when adding an already existing key
tagValue String Optional Tag value
  • 1 - 127 characters
  • Special characters (-, _) can be used
  • Use to distinguish individual resources that share a tag key

Request example

The request example is as follows:

curl --location --request POST 'https://resourcemanager.apigw.ntruss.com/api/v1/resources' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
          "nrn": "nrn:PUB:IoTDeviceHub::****:Project/49"
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
pageIndex Integer - Page number
pageSize Integer - Page output count
itemCount Integer - Number of response results
hasMore Boolean - Whether additional pages exist
  • true | false
    • true: It exists
    • false: It doesn't exist
items Array - Response result

items

The following describes items.

Field Type Required Description
nrn String - NAVER Cloud Platform resource identification value
platformType String - Platform type
  • BOTH | VPC | Classic
    • BOTH: common platform environment
    • VPC: VPC environment
    • Classic: Classic environment
productName String - Service code of the resource
productDisplayName String - Service name of the resource
regionCode String - Region code of the resource
regionDispalyName String - Region name of the resource
resourceType String - Resource type
resourceId String - Resource ID
resourceName String - Resource name
createTime Integer - Resource creation date and time (millisecond)
  • Unix timestamp format
eventTime Integer - Resource change date and time (millisecond)
  • Unix timestamp format
tag Array - Resource tag information
  • Display upon query of a specific resource
group Array - Resource group name
  • Display upon query of a specific resource

Response status codes

For information about the HTTP status codes common to all Resource Manager APIs, see Resource Manager response status codes.

Response example

The response example is as follows:

{
    "pageIndex": 0,
    "pageSize": 20,
    "itemCount": 1,
    "hasMore": false,
    "items": [
        {
            "nrn": "nrn:PUB:IoTDeviceHub::****:Project/49",
            "platformType": "BOTH",
            "productName": "IoTDeviceHub",
            "productDisplayName": "IoT Device Hub",
            "regionCode": "KR",
            "regionDisplayName": "Korea",
            "resourceType": "Project",
            "resourceId": "49",
            "resourceName": "testrename",
            "createTime": 1646809414000,
            "eventTime": 1646809414000,
            "tag": [
                {
                    "tagKey": "key02",
                    "tagValue": "key02-01"
                },
                {
                    "tagKey": "key01",
                    "tagValue": "key01-01"
                }
            ],
            "group": [
                "group02",
                "group01"
            ]
        }
    ]
}