SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Python Request Library Example for SystemLink HTTP API

I’m trying to utilize the request package from python to query test results/ test step values from the Swagger page.

 

I am not able to get a good request out. Does anyone have any suggestions or examples of someone utilizing the Python request package to get results?

 

Here's a screenshot from JupyterLab:

 

wickywoo_0-1646226977485.jpeg

 

 

Thanks in advanced!

0 Kudos
Message 1 of 6
(2,653 Views)

Hi Joshua,

I think I have looked at the links you've proved below before.

Are these examples applicable to Jupyter Environment outside of the SystemLink server? I'm trying to utilize Domino Data Lab Virtual Machines and locally hosed Jupiter instance to query data by utilizing the HTTP APIs.

Thanks,

Wicky

0 Kudos
Message 3 of 6
(2,612 Views)

I think most of these examples leverage our SystemLink Python SDK that normally installs with the SystemLink Server Jupyter Notebook support. On your SL server there is an NI package that gets install and should be cached under "C:\ProgramData\National Instruments\NI Package Manager\packages\ni-systemlink-python-3.8-systemlink-sdk_21.5.0.49361-0+f209_windows_x64.nipkg"

 

If you open this package using 7-zip you can probably extract the .whl files and manually install them into your other environment. 

 

We have started moving some of these items to a pip package, but currently only the tag API is available.

https://pypi.org/project/nisystemlink-clients/

 

0 Kudos
Message 4 of 6
(2,608 Views)

Thanks, I'll look into that. How would I get the connection and authenticate to the SystemLink server after installing the library locally/ in the Domino VM? I am looking at this example here and trying to query test step results:

https://github.com/ni/systemlink-server-examples/blob/05fa1fc0340263ffc997e41f46ddaecb132c62d9/jupyt...

 

 

0 Kudos
Message 5 of 6
(2,589 Views)

https://<your-server>/niapis/python/modules/systemlink.clients.nitestmonitor.configuration.html

 

You need to specify the host, username, and password manually in your notebook.

 

Screen Shot 2022-03-03 at 8.52.47 AM.png

0 Kudos
Message 6 of 6
(2,583 Views)