UpdateResourceMember - Update Resource Member
Update a resource member using OpenAPI.
|
Applicable editions |
Central edition, Region edition |
Service endpoint and authorization information
- Obtain the service endpoint. Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Obtain the organization ID. Required only for the Central edition. Navigate to the Basic Information page in the Organization Management console to retrieve the organization ID.
|
Product |
Resource |
Required permission |
|
Pipeline |
Resource member |
Read and write |
Request syntax
Central edition
PUT https://{domain}/oapi/v1/flow/organizations/{organizationId}/resourceMembers/resourceTypes/{resourceType}/resourceIds/{resourceId}
Region edition
PUT https://{domain}/oapi/v1/flow/resourceMembers/resourceTypes/{resourceType}/resourceIds/{resourceId}
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
organizationId |
string |
path |
|
The organization ID. |
5ebbc0228123212b59xxxxx |
|
resourceType |
string |
path |
Yes |
resource type, pipeline, and host group. |
pipeline |
|
resourceId |
string |
path |
Yes |
The resource ID. |
123 |
|
roleName |
string |
query |
Yes |
The role name. For host groups (hostGroup): user (member, use permissions) or admin (administrator, use and edit permissions). For pipelines (pipeline): admin (administrator, view, run, and edit permissions), member (run permissions), or viewer (view permissions). |
admin |
|
userId |
string |
query |
Yes |
The user ID. |
2211221 |
Request examples
Central edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/resourceMembers/resourceTypes/pipeline/resourceIds/123?roleName=admin&userId=2211221' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/flow/resourceMembers/resourceTypes/pipeline/resourceIds/123?roleName=admin&userId=2211221' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
|
- |
boolean |
Indicates whether the operation succeeded. |
true |
Response example
true
Error codes
For more information, see Error Code Center.