LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deployed Web Service Administration LV API

Eventually these will make their way to vipm.io but I'm releasing them a bit early here for someone until I finish up documentation and examples for the Web&Crypto package. Everything is MIT licensed and the core Base64 implementation is taken from the Fast Base64 VIs that were found on the NI forums and are also MIT licensed. Currently available for LV2018+.

 

Disclaimer first: These libraries are provided as-is without guarantee they are without bugs. They're completely open-source so if you find something feel free to dig in! There is no support provided for these packages as I'm just doing this stuff in my spare time. There is a zero-tolerance policy for people that are impatient with things they get for free.

 

 

This post is intended to provide access to the WS Admin package, which depends on functionality provided in the Web&Crypto package. Install the Web&Crypto package first and then install the WS Admin package. Palettes will be created to provide access to the functionality from block diagrams and you can see example usage of the WS Admin library in the VIPM package details window. The Web Services authentication was implemented based on the documentation found at https://www.ni.com/en-us/support/documentation/supplemental/08/labview-web-services-security.html and if you have questions about the Access / Secret IDs or other aspects of interacting with Web Services check out that page first. The rest of the web service interaction is undocumented and was figured out by debugging the behavior of the Web Services administration web interface in Internet Explorer.

 

The WS Admin provides LV VIs for pausing, starting, restarting, and undeploying web services that are already deployed as well as determining a web service's current status. There is no functionality for programmatic deployment of Web Services; deploying still needs to be accomplished through the project, building into an executable, or creating a installer that deploys the Web Service(s).

 

 

Only the WS Admin package is fully documented with an example provided.

 

The Web&Crypto package provides functionality for:

  • Base64 encode/decode along with handling for the URL variant of Base64
  • Yet another JSON library that makes it possible to work with JSON that has optional properties and builds/navigates JSON incrementally but isn't designed for repeated random access to JSON values. It's meant more for helping get data in and out of LabVIEW representations but much more manually than other JSON functionality out there.
  • Cryptography functions that currently provide pure-LabVIEW implementations for SHA-256 hash and HMAC signature algorithms, enough to cover the HS256 JWT signing algorithm. RS256 is not coming anytime soon until I nail down utilizing openssl on all platforms to handle the asymmetric signing algorithm.
  • JWT library for working with unsigned JSON Web Tokens or tokens signed with HS256 using the Crypto library above that also comes in the package.

 

Currently everything in these libraries is pure LabVIEW and as such should run on any target that LabVIEW runs on. Feel free to ask any questions in this post but be mindful of the disclaimer above!

Message 1 of 3
(1,508 Views)

Probably should have thought to add a screenshot before the edit window expired but here's the example usage (It's insanely simple):

Example.png

 

It also allows specifying the Access ID / Secret ID if you've changed them from the default shipping values.

 

0 Kudos
Message 2 of 3
(1,452 Views)

Good Job Very Helpful for me!

0 Kudos
Message 3 of 3
(48 Views)