Last Updated on : 2024-06-28 23:28:22download
Query a list of resources in the specified space. If only_sub
is specified as false
, you can query the list of resources under the current space and all subspaces. Otherwise, you query only the list of resources under the current space.
GET: /v2.0/cloud/space/{space_id}/resource
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
space_id | Long | uri | true | The ID of the specified space. |
only_sub | Boolean | query | false | Specifies whether to query only the direct child nodes. |
last_row_key | Long | query | false | The starting ID of the query. |
page_size | Integer | query | false | The number of items returned per page. |
Parameter name | Type | Description |
---|---|---|
success | Boolean | Indicates whether the request is successful. Valid values:
|
error_code | String | The error code. For more information, see the error codes. |
error_msg | String | The message that is returned if the request fails. It is empty if the request is successful. |
result | Object | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
data | List | The list of resources. |
last_row_key | Long | The starting ID of the query. |
page_size | Integer | The number of items returned per page. |
Description of data
Parameter name | Type | Description |
---|---|---|
res_id | String | The ID of the specified resource. Its meaning is determined by the resource type. For example, when the resource type is 0 , this parameter represents a device, which is equivalent to device_id . |
res_type | Integer | The type of the specified resource.
|
GET: /v2.0/cloud/space/15000***/resource?onlySub=true&lastRowKey=0&pageSize=100
{
"result": {
"last_row_key": 0,
"data": [
{
"resType": 0,
"resId": "vdevo167102917612***"
},
{
"resType": 0,
"resId": "vdevo167102921401***"
}
],
"page_size": 200
},
"success": true
}
For more information, see error code.
For more information, see Limits on API Request Frequency.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback