Use the GETorchestration/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/orchestration/workspaces?query=environment.name==default
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/account/users?page=1&size=50
If the user already has a permission on workspace, use the
PUTsecurity/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/security/workspaces/7a35e78eaea645620e47f826/users/d13404b5-e9nc-4g5f-9904-a5f0dc287fb0/permissions
["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"]
Information noteNote: When a user account has the TMC_ENGINE_USE user permission,
this account can be granted the EXECUTE and the
VIEW workspace permissions only. This combination allows users
that do not have the Operator role to use Remote Engines to
run tasks without having to consume a seat.
If the user does not have any permissions on the workspace, use the
POST/security/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/security/workspaces/7a35e78eaea645620e47f826/users/d13404b5-e9nc-4g5f-9904-a5f0dc287fb0/permissions
["AUTHOR", "EXECUTE", "MANAGE", "PUBLISH", "VIEW"]
Information noteNote: When a user account has the TMC_ENGINE_USE user permission,
this account can be granted the EXECUTE and the
VIEW workspace permissions only. This combination allows users
that do not have the Operator role to use Remote Engines to
run tasks without having to consume a seat.
Use the GET /security/workspaces/{workspaceId}/users/{userId}/permissions
endpoint to validate the update.
Example
GET https://api.us.cloud.talend.com/security/workspaces/7a35e78eaea645620e47f826/users/d13404b5-e9nc-4g5f-9904-a5f0dc287fb0/permissions
The response body should contain the workspace ID, and all assigned
permissions.