- Documentation
 - Resource
 - Authorize Asset
 
Authorize Asset¶
Authorize assets to a user.
Prerequisites¶
Assets have been synchronized to Admin Console. If not, you can synchronize assets through the Sync Asset API.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/asset/append
Request Parameters (Body)¶
Name  | 
Required/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
userId  | 
Required  | 
String  | 
The user ID. How to get userId >>  | 
orgId  | 
Required  | 
String  | 
The OU ID which the asset belongs to. How to get orgId >>  | 
assetIds  | 
Required  | 
String  | 
The asset ID. Supports the query of multiple asset IDs, separated by commas. How to get assetId >>  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
data  | 
Boolean  | 
Whether the asset is successfully authorized.   | 
Error Codes¶
Code  | 
Description  | 
|---|---|
31400  | 
User ID or OU ID cannot be empty  | 
31403  | 
Application is not authorized to access user or asset information  | 
31404  | 
Corresponding user, OU or asset not found  | 
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/asset/append
method: POST
requestBody:
{
  "userId": "your_user_id",
  "assetIds": [
    "your_asset_id"
  ],
  "orgId": "your_org_id"
}
Return Sample¶
{"code":0,"message":"","data":true}