Query Accessible Asset¶
Get a list of accessible assets by object type IDs.
Request Parameters¶
Name | Location | Mandatory/Optional | Data Type | Description |
---|---|---|---|---|
orgId | Query | Mandatory | String | The organization ID which the asset belongs to. How to get orgId >> |
accessKey | Query | Optional | String | The access key of the application. How to get accessKey>> |
mdmTypes | Query | Mandatory | String | The object type ID which the asset belongs to. Separate multiple IDs by commas. Up to 100 object type IDs are allowed in a single query. How to get mdmTypes>> |
attributes | Query | Optional | String | The attribute of the asset. Separate multiple attributes by commas. Both model attributes and “virtual attributes” defined in Common Data Service are supported. How to get attributes>> |
pageNo | Query | Optional | Integer | The number of page to be returned, starting from 1. |
pageSize | Query | Optional | Integer | The number of the returned records on a single page. The maximum number is 20000. |
locale | Query | Optional | String | Use zh-CN, en-US, ja-JP, or es-ES. If not specified, the value is set to en_US by default. |
withI18n | Query | Optional | Boolean | Whether to return the internationalization content. The value is true or false . Default is false. |
Response Parameters¶
Name | To Return Definitely/Conditionally | Data Type | Description |
---|---|---|---|
mdmId | Definitely | String | The identifier of the asset instance. To ensure query performance, it is recommended that you pass in no more than 100 object instances in a single query. |
attributes | Definitely | Attribute Struct | Describe the attributes of the asset. |
Samples¶
Request Sample¶
GET https://{api-gateway}/cds-asset-service/v1.0/accessible-asset?action=query&orgId=yourOrgId&mdmTypes=yourMdmType
Response Sample¶
{
"data": [
{
"mdmId": "site 1",
"attributes": {
"mdmId": "yourMdmId",
"mdmType": "EnOS_Solar_Site",
"name": "*************"
}
},
{
"mdmId": "site 2",
"attributes": {
"mdmId": "yourMdmId",
"mdmType": "EnOS_Solar_Site",
"name": "*************"
}
}
],
"code": 0,
"msg": "OK",
"traceId": "1234567890abcdefghijkl0987654321"
}