Use the Talend Cloud API Tester
management API to change a test project's owner.
Note: You can only have one owner for a test project, and the owner must be a user and not a
group.
Before you begin
- You are the owner of the test project that you want to edit.
- You have the test project ID.
- You have the new owner's user ID.
Procedure
-
Create a new request.
-
In the METHOD drop-down list, select
PUT.
-
Enter the following URI with the correct region, and replace
{testId}
with the project ID retrieved in Fetching your API project ID:
-
Click the Add header
button and enter Authorization in the
name field and Bearer followed by a space and your token in the
value field.
Tip: In
Talend Cloud API Tester,
you can add your token as a private environment variable and reference it in
your requests using the expression builder. For more information, see
Using environments.
-
Enter the body of the request.
In this example, you want to add a new user as owner and still have access to
the project a editor. To do that, take the IDs retrieved in
Fetching user IDs and replace
<new owner user
ID>
with the new owner's user ID and
<old owner user
ID>
with your user ID.
{
"users": [
{
"userId": "<new owner user ID>",
"level": {
"code": "OWNER"
}
},
{
"userId": "<old owner user ID>",
"level": {
"code": "WRITER"
}
}
]
}
-
Once your request is configured, click Send.
Results
The API test project's sharing settings are updated. To check that the owner was
correctly updated, you can send a
GET
request to the
https://apit.{region}.cloud.talend.com/api/v1/api-tests/{testId}/sharings
URI if you still have access to the project.