Possible to SSH into gateway machine and import tags via a python script?

Hi! I’d like to set up a script a gateway machine that can update tags from a git repository. I know there is a Python API available to update tags. I guess my real question is, is that API available outside the gateway event scripts and the project scripts? is it possible to write a python script saved on the gateway machine, ssh in, execute it and have tags updated in this manner?

No, not really. Ignition’s Python (Jython, it should be clarified) environment is only available within the context of the running Ignition instance.
There are a lot of different approaches to do what you’re ultimately describing, but one of the easiest might be to use the Web Dev module. You can create your own web API (responding to GET/POST/PATCH/etc requests) that call arbitrary Python code within Ignition, using passed parameters. It’s not as interactive as an SSH session, but it gets you remote access and Ignition script functions all in one.

Thanks I’ll look into this WebDev module!

Does this WebDev module operate specifically with a project? The documentation suggests I access the WebDev modules from the Designer with an open project. I was looking for a way to access the API outside of any specific project.

Scripts running within a gateway project context have full access to all non-project resources and APIs in the gateway. (Though module SDK API usage is not officially supported.)

I understand. So if I’ll just have to manage this from within one specific project but I could use it to say, import tags via the API

Yes.

Is this module available in trial mode? I can’t find it anywhere.

Have you specifically installed the module? It should show up as a node in the project tree in the designer.

No, the documentation didn’t mention, installation that I saw. Where can I download the module?

https://inductiveautomation.com/downloads/ignition/8.0.16
Download the ‘WebDev’ module for your version.

Ahh, I totally missed that. Much appreciated!