Granting full access to a user on a workspace - Cloud

Talend Cloud APIs User Guide

EnrichVersion
Cloud
EnrichProdName
Talend Cloud
EnrichPlatform
Talend API Designer
Talend API Tester
Talend Data Preparation
Talend Data Stewardship
Talend Management Console
task
Design and Development > Designing APIs
Design and Development > Testing APIs

Before you begin

  • You must have Environment Administrator role in Talend Cloud Management Console.
  • You must know the IDs of the workspace and user for which your are setting the permissions.

About this task

You can access the Management Console API via https://api.us.cloud.talend.com/tmc/swagger/swagger-ui.html. You'll find a list of the URLs corresponding to each data center in Talend Cloud regions and URLs.

Procedure

  1. Use the GET /workspaces endpoint to retrieve the ID of the workspace you are setting the permissions for.
    You can narrow the search to a single environment by using the query=environment.name=={environmentName} query parameter.

    Example

    GET https://api.us.cloud.talend.com/tmc/v2.4/workspaces?query=environment.name==default
  2. Use the GET /v1/management/users endpoint to retrieve the ID of the user you want to set the permissions for.

    Example

    GET https://api.us.cloud.talend.com/v1/management/users?page=1&size=50
  3. If the user already has a permission on workspace, use the PUT /workspaces/{workspaceId}/users/{userId}/permissions endpoint and add the permissions (["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"]) in the body of the request.

    Example

    PUT https://api.us.cloud.talend.com/tmc/v2.4/workspaces/7a35e78eaea645620e47f826/users/d13404b5-e9nc-4g5f-9904-a5f0dc287fb0/permissions
    ["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"]
  4. If the user does not have any permissions on the workspace, use the POST /workspaces/{workspaceId}/users/{userId}/permissions endpoint and add the permissions (["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"] in body of the request.

    Example

    POST https://api.us.cloud.talend.com/tmc/v2.4/workspaces/7a35e78eaea645620e47f826/users/d13404b5-e9nc-4g5f-9904-a5f0dc287fb0/permissions
    ["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"]
  5. Use the GET /workspaces/{workspaceId}/users/{userId}/permissions endpoint to validate the update.

    Example

    GET https://api.us.cloud.talend.com/tmc/v2.4/workspaces/7a35e78eaea645620e47f826/users/d13404b5-e9nc-4g5f-9904-a5f0dc287fb0/permissions
    The response body should contain the workspace ID, and all assigned permissions.
    "workspaceId": "7a35e78eaea645620e47f826",
    "userId": "d13404b5-e9nc-4g5f-9904-a5f0dc287fb0",
    "permissions":["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"]