Is it possible to create a workflow which imports a workflow from a Gitlab repository and sets user rights and auto run times?

Hello,

I would like to automise the way I am handling workflows on different servers. So far I do all steps manually and this is very time consuming and might cause errors. Since the REST API seems to have many hidden features I would like to know if each step somehow can be realised before I dig deeper into the how to.

Step 1. I do Upload all the workflow folders form my local KNIME to our GITLAB Server - could I use KNIME for that? I saw there are new GIT nodes, but they seem not to allow file handling.

Step 2. I need to copy all workflows I recently changed from the GITLAB Server to the different KNIME servers. I guess I can just download the zip and overwrite the folders on the server via a workflow?

Step 3. I need to make sure the user settings are as needed for each workflow - usually I do that manually via the KNIME Explorer - I would like to automise this step for old and new workflows.

Step 4. I need to set the scheduled time, to adjust if and when a workflow should run…same as in 3.

Many thanks in advance!
Best Lars

Hi Lars,

I think most of this should be possible via the REST API of KNIME Server. I’m actually putting together a blog post on the topic of moving workflows between servers (no promises as to when that’ll be done, though :wink: ).

To see all available functionality of your current server installation, go to https://server-address:port/knime/rest/v4/_profile/knime-server-doc-v4.xml.

I have attached a workflow that shows you how to upload workflows (or workflow groups) to KNIME Server.

What exactly do you mean with user settings in step 3? The permissions? That’s also possible via REST, there is an example workflow included with the server installer (in the Admin folder).

I also attached an example for scheduling via REST.

Hope that helps!

Cheers,
Roland

01_ScheduleJob.knwf (99.7 KB)
serverUploadREST.knwf (49.9 KB)

1 Like

Thanks a lot Roland!

I will dig into it, what I have seen so far does look like what I was hoping for.

Regarding the step 3. Ja I am referring to the user settings. As far as I understand the workflow from the admin section, this one does allow to create users and user groups. But what I need is to tell a workflow I uploaded in step 2 what user rights are granted to the very workflow (via REST?). Is that also possible via this workflow you mentioned or can I do something else?

Best Lars

Hi Lars,

The workflow I mentioned doesn’t do exactly that, but you should get all the information you need from the section in the lower right (Generating Directories). The main point is that you can check / change permissions by sending a GET / POST request to the :permissions endpoint of a workflow. Just send a GET request to :permissions to get a template of the correct format.

Cheers,
Roland

1 Like