SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to systemLink server using other methods other than http

Solved!
Go to solution

Hi my client wants students at their university to use python to connect to systemlink server and import files and tag data but doesnt like the idea of using username and password in the code. We have tried to used api keys, but from my understanding we have to create a unique for each user which is a bit of hassel to create api key for each user(100+).

 

1. Is there another way of connecting to the server other than http?

2. If i all students use 1 api key will that create any issue like server getting overvelmed by requests?

3. Do i need to install SystemLink Client on each computer trying to use python tom import data? 

 

Message 1 of 8
(533 Views)
Solution
Accepted by Ozfarmboy

Using the HTTP APIs is the supported way to communicate with SystemLink. There are several python wrappers that simplify this communication that allow you to access many SystemLink APIs without having to manually construct your HTTP requests. You can find all the documentation on the APIs on your own SystemLink Server. Look at http://<your SystemLink address>/niapis/python/modules/systemlink.clients.nitag.html to see the details.

 

We do recommend that each user use their own credentials when connecting with the server. Sharing a single API key presents a security risk to your server. While it would work to share an API key, it is not recommended. 

 

Storing usernames and passwords in code (especially code that will be submitted to source control) is also not generally recommended. We would recommend that you store usernames and passwords outside of code. We often do this with simple json files or by passing credentials through command line arguments to scripts. 

 

You can see a good example of passing credentials on the command line in this example: systemlink-server-examples/python/testmonitor/manual config/manual_config.py at master · ni/systemli...

This example is using the TestMonitor Results API, but you can do the same pattern to construct client configurations for any of the SystemLink Python APIs. 

 

If you are directly communicating with the http APIs (either directly or through Python) you do not need to have the client installed on your machine. However, if you do want to have individual machines automatically publish system health information, upload test results, or receive software updates, you will need to install the SystemLink Client. 

Message 2 of 8
(491 Views)

This is good info.  Thanks for your detailed response Adam.

 

I think one of the concerns that still remains is that HTTP is an unsecure protocol, and our client has tight cybersecurity requirements.  Is there any plans to make this secure?

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 3 of 8
(482 Views)
Solution
Accepted by Ozfarmboy

You can enable HTTPS and install a certificate. Is that what you are looking for?

Message 4 of 8
(478 Views)

Yes.

 

I think we're getting lost in the documentation sets.

 

These articles mention nothing about HTTPS: HTTP API Reference - NI

 

But these do: Network Security - SystemLink Operations Handbook

 

 

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 5 of 8
(471 Views)

Ah yes. I can appreciate the confusion over documentation.

 

I can confirm that you can use the APIs via HTTPS.

Message 6 of 8
(469 Views)

Appreciate your help guys.  These probably seem like obvious questions, but you've been very helpful!

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 7 of 8
(467 Views)

Thank you Adam, this is all been very useful and has helped to connect to systemLink server using python. Here is snippet of the code I used 

 

zombae_0-1715645073361.png

 

and the response i am getting from the server. 

zombae_1-1715645111507.png

 

 

 

Message 8 of 8
(259 Views)