REST API to get the list of members assigned for Data app deployments

Hi Team

Can anyone guide me which Rest API to use for pulling the list of members enabled (shared) for data apps in KNIME Business hub?

Sharing a data app is equivalent to granting users (or groups) certain actions on the deployment. In this case it’s the DATA_APP_DEPLOYMENT_SHARED_JOB_CREATE action which is granted by the sharedDeploymentUser role. Therefore you have to

  1. Get the policies for the respective deployment: GET .../execution/permissions/policies/data_app_deployment/<deployment id>
  2. Find the policies that grant the account:team:*:sharedDeploymentUser role
  3. Get the uogId (user or group id) from the policy
  4. Look up the members of the corresponding group

Note that this gives you the users outside the team in which the deployment was created. Team members have permissions on all deployments, granted by the dataAppDeploymentUser role.

2 Likes

Thanks Thor for the reply and inputs.
Can you let me know how to find out the deployment ID in the KNIME business hub for a workflow? Checked under deployments and could see only workflow names

Please have a look at the OpenAPI documentation of the Hub API. You can find it at https://api.<your-hub>/api-doc/. https://api.<your-hub>/api-doc/?service=execution#/Deployments/get_deployments__account_id__data_apps is a call that returns you all data app deployments which you can optionally filter by workflow ID.

2 Likes

Thanks Thor for the reply. Received below 404 error while trying to get request from the below REST API.

Can you please guide if i am missing something.

Note:
workflow id, workflow path, name, id (data-app:id) received from the below Get request output
https://api.kbbhpreprod.com/deployments/account:team:2b892f0c-6952-472c-82b7-ab93ea144e15/data-apps

Getting 404 error

The OpenAPI currently uses wrong URLs for permissions and limits functionality. You have to prefix the paths with /execution as you can see in my previous post.

Thanks Thor for the steps and Guidance.

Finally extracted the required data dataAppDeploymentAdmin & sharedDeploymentUser for the DataApp.

Much Appreciated your support!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.