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
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
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 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
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