Get Users with Asset Access

Get the list of users who have access permission to a specific asset.

Operation Permissions

User login to Application Portal is not required.

Request Format

POST https://{apigw-address}/app-portal-service/v2.1/asset/authorize/user/list

Request Parameters (Body)

Name

Mandatory/Optional

Data Type

Description

assetId

Mandatory

String

The asset ID. How to get asset ID>>

orgId

Mandatory

String

The organization ID which the asset belongs to. How to get organization ID>>

Response Parameters

Name

Data Type

Description

data

Data Struct

The user information.

Data Struct

Name

Data Type

Description

id

String

The user ID.

name

String

The user name.

Samples

Request Sample

url: https://{apigw-address}/app-portal-service/v2.1/asset/authorize/user/list
method: POST
requestBody:
{
  "orgId":"yourOrgId",
  "assetId":"Dqp9GZsT"
}

Return Sample

{
    "code": 200,
    "message": "",
    "data": [
        {
            "id": "theUserId",
            "name": "Pony"
        }
    ]
}

Java SDK Sample

public class AppPortalSdkTest{
    @Test
    public void getPrivilegedUsersToAssetTest() {
        PrivilegedUserListToAssetRequest request = new PrivilegedUserListToAssetRequest("your_org_id", "your_asset_id");
        PrivilegedUserListToAssetResponse response = Poseidon.config(PConfig.init().appKey("your_access_key").appSecret("your_secret_key").debug())
                .url("https://{apigw-address}").getResponse(request, PrivilegedUserListToAssetResponse.class);
        assertNotNull("response data should not be null", response.data);
    }
}