Append Resource to User Group


Assign resources to a user group in batches. Up to 1,000 resources can be assigned at a time.

This API adopts a full update method, and each call will overwrite the existing resources of the user group. Before you call this API, it is recommended to use the Get User Group Resource List API to get the full list of resources for the user group to ensure the accuracy of allocation.

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/userGroup/resource/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

userGroupId

Required

String

User Group ID.

resourceIds

Required

Array

List of resource 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/userGroup/resource/append?orgId=yourOrgId
method:POST

{
    "userGroupId": "userGroupId",
    "resourceIds": [
        "abcde",
        "vwxyz"
    ]
}

Return Sample


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