Updating the API project ownership - Cloud

Talend Cloud APIs User Guide

Version
Cloud
Language
English (United States)
Product
Talend Cloud
Module
Talend API Designer
Talend API Tester
Talend Data Preparation
Talend Data Stewardship
Talend Management Console
Content
Design and Development > Designing APIs
Design and Development > Testing APIs

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

  1. Create a new request.
  2. In the METHOD drop-down list, select GET.
  3. Enter the following URI with the correct region, and replace {testId} with the project ID retrieved in Fetching your API project ID:
    https://apit.{region}.cloud.talend.com/api/v1/api-tests/{testId}/sharings
    The region can be:
    • us-west
    • us
    • eu
    • ap
    • au

    For more information, see Talend Cloud regions and URLs.

  4. 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.
  5. 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"
          }
        }
      ]
    }
  6. 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.