Append User to Resource


Assign a resource to users in batches. Up to 1000 users can be assigned to at a time.

The API adopts incremental update method and will not affect the user’s existing resources.

Prerequisites


The OU has obtained the application, or the application is a self-built application in the OU.

Request Format


POST https://{apigw-address}/app-portal/api/v3/resource/user/append

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

OU ID. How to get orgId >>

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

resourceId

Required

String

Resource ID to be assigned.

userIds

Required

Array

List of user IDs to be assigned, up to 1000 IDs at a time.

Response Parameters


Name

Data Type

Description

success

Boolean

Whether the assignment was successful. true means successful assignment, false means assignment failed.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/resource/user/append?orgId=yourOrgId
method:POST

{
    "resourceId": "resourceId",
    "userIds": [
        "abcde",
        "vwxyz"
    ]
}

Return Sample


{
    "code": 0,
    "message": "",
    "data": {
        "success": true
    }
}