Process for extracting the Teams and spaces details from KNIME Business Hub

Hi Team,

We are currently entered into KNIME Business HUB and we have created the Teams and Spaces in KBH now I would like to extract all these details into an Excel sheet to compare with KNIME Server folder structure.

Is there a way to extract these details. Please suggest us any workflow to get the details

Thanks in Advance,
Subramanyam Kinthada.

Hi,
You can make a GET request to https://api.<hub-name>/accounts/ to get a list of teams as JSON. The request must be authenticated with an application password. If you want to get team details, you can make a GET request to https://api.<hub-name>/accounts/<team-id>. For teams, you can get spaces by making a GET request to https://api.<hub-name>/knime/rest/v4/repository/Users/<team-name> to list all spaces of a team. In the same fashion as the server REST API, you can also traverse the repository further down. Please make sure that the team name is properly URL encoded, i.e. spaces replaced by %20, etc.
Kind regards,
Alexander

4 Likes

Hi @AlexanderFillbrunn,

Is this the workflow for the above suggested configurations?

Please confirm me.

Thanks,
Subramanyam Kinthada

Hi @Subramanyam,
The workflow in your screenshot seems to be a data app to discard jobs running on KNIME Business Hub. A job is a currently running KNIME workflow. What you are looking for is a workflow for listing teams and repository contents, so not exactly what the workflow above does.
Kind regards,
Alexander

Hi @AlexanderFillbrunn

Yes exactly, I required a workflow to fetch Teams and repository contents. I have tried above process but no luck.

Could you please help me in designing the workflow.

Thanks,
Subramanyam Kinthada

Hi Subramanyam,
I won’t be able to assist with the full workflow, but I can give you some extra pointers. I already listed the relevant REST calls above. If you want to use those in a workflow, you can use the GET Request, POST Request, etc. nodes to send the requests to KNIME Business Hub. The results will come back as JSON and to extract the information you are looking for, you can use the JSON Path and JSON to Table nodes. For traversing directory structures, you can recursively go through the outputs of the nodes with the Recursive Loop Start and Recursive Loop End nodes.
Kind regards,
Alexander

2 Likes

Hi Subramanyam,
I figured other people might find it helpful too, so I built the workflow and published it on KNIME Community Hub. You can find it here: Hub Workflow List – KNIME Community Hub.
Make sure to use an application password for an admin so you can list all teams and spaces.
Alexander

2 Likes

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