UpdateResourceOwner - Transfer resource object ownership
Transfers resource object ownership to another member by calling this API operation.
|
Applicable editions |
Central edition, Region edition |
Endpoints and authorization information
- Get an endpoint: Replace {domain} in the API request syntax.
- Get a personal access token.
- Get the organizationId: Required only for Central edition. Go to the Basic Information page in the Organization Management console to obtain the organization ID.
|
Product |
Resource |
Required permission |
|
Pipeline |
Resource member |
Read and write |
Request syntax
Central edition
POST https://{domain}/oapi/v1/flow/organizations/{organizationId}/resourceMembers/resourceTypes/{resourceType}/resourceIds/{resourceId}/transfer/owner
Region edition
POST https://{domain}/oapi/v1/flow/resourceMembers/resourceTypes/{resourceType}/resourceIds/{resourceId}/transfer/owner
Request headers
|
Parameter |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
string |
Yes |
The personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Position |
Required |
Description |
Example |
|
organizationId |
string |
path |
|
The organization ID. |
5ebbc0228123212b59xxxxx |
|
resourceType |
string |
path |
Yes |
The resource type. Valid values: `pipeline` for pipelines, `hostGroup` for host groups. |
pipeline |
|
resourceId |
string |
path |
Yes |
The resource ID. |
123 |
|
newOwnerId |
string |
query |
Yes |
The user ID of the new owner. |
2211221 |
Request examples
Central edition
curl -X 'POST' \
'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/resourceMembers/resourceTypes/pipeline/resourceIds/123/transfer/owner?newOwnerId=2211221' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'POST' \
'https://{domain}/oapi/v1/flow/resourceMembers/resourceTypes/pipeline/resourceIds/123/transfer/owner?newOwnerId=2211221' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
|
- |
boolean |
Indicates whether the request is successful. |
true |
Response example
true
Error codes
For more information about API error codes, see Error Code Center.