SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP APIs to Manage Systems

Solved!
Go to solution

Hello Everyone,

 

I was looking the HTTP APIs to manage systems programmatically.

For example, I would like to get below mentioned information using HTTP API:

 - List of managed systems, installed packages on them, hardware interfaces connected to them and their status.

 

On looking Github page for SystemLink, I found some documentation, but they are not working.

 

By hacking the HTTP frames going out of SystemLink web UI a bit, I found "http://<SystemLinkServer>/nisysmgmt/v1/systems/managed?id=<managed_system_ID>", but the response of this is too vague. I can see the JSON response which gives "packages" and "sysapi".

 

Somehow I can parse "packages" to get meaning info what I need, but I am struggling to parse "sysapi".

"sysapi": has lot of information within it, basically I want list of interfaces and their status.

 

Sample HTTP response is attached, if anyone can help me to get this done.

0 Kudos
Message 1 of 5
(3,375 Views)
Solution
Accepted by topic author D.S

The "tag"s returned in the "sysapi" response are enumerated attributes. There's a long list of attributes and definitions can be found on disk when you install LabVIEW but for now let's focus on the two attributes that you asked for.

 

Based on your request here are some pertinent tags:

  • "Resource Name" is 16896000
  • "Alias" is 16904192
  • "Is Device" is 16781312
  • "Is Simulated" is 16814080
  • "Is Present" is 16924672 with enum values:
    • Initializing=-2
    • Unknown=-1
    • Not Present=0
    • Present=1

Based on these tags it looks like your system has:

Simulated Devices:

  • MySimIO: Present
  • myDAQ234: Present

Controller:

  • JLR1IEMM4LNLNQ2: Present

Physical Devices:

  • COM3: Not Present

Is this correct?

 

Message 2 of 5
(3,328 Views)

Thanks quick response, this is what I was looking for.

I have LabVIEW installed, on which file I can see those "tag" definitions.

 

 

Thanks.

0 Kudos
Message 3 of 5
(3,320 Views)

The nisysapi.rc resource file stores the attribute values as hexidecimal.
I'm working on a quick script to pull in the tag numbers based on the attributes documented here:
http://zone.ni.com/reference/en-XX/help/373107N-01/nisyscfg/property_node_hardware/


Example directory for nisysapi.rc:
"C:\Program Files\National Instruments\LabVIEW 2018\resource\objmgr\nisysapi.rc"

Message 4 of 5
(3,317 Views)

Okay here's a csv of Tag numbers -> Property names described at http://zone.ni.com/reference/en-XX/help/373107N-01/nisyscfg/property_node_hardware/

I noticed that there were a few overlaps between the file and the descriptions online and so somethings may be missing and/or inaccurate (I expect something like 6 out of 134 are missing as a result). The ones I posted earlier are represented accurately in my spot check. Instead of a deeper validation, I'll post what I have and let someone reply or create a new thread if the file is inaccurate.

Message 5 of 5
(3,283 Views)