Plug-In Library
- Updated2024-10-16
- 3 minute(s) read
Plug-In Library
A plug-in library is an HTTP web API that contains services you use to take measurements. Plug-in libraries enable you to share and collaborate across teams.
Plug-In Library Installation
Windows
Installation
The plug-in library is available as a stand-alone service, or as an optional package when installing InstrumentStudio using NI Package Manager.
For more information on installing NI software, refer to the NI Package Manager user manual.
Linux
Installation
NI Linux Device Drivers are required to use the plug-In library service and optional CLI on Linux. Refer to Installing NI Drivers and Software on Linux Desktop for more information on installing required drivers and feeds.
- ni-plugin-library-service-bin
- ni-plugin-library-cli-bin
By default, the plug-in library service (nipluginlibrary.webapi) requires root access to run. If you do not want to run the service as root or via sudo, you can add a user to the nipluginlib group. This group owns files and folders accessed by the plug-in library service.
Starting a Plug-In Library
- Linux: Type (nipluginlibrary.webapi) and press Enter to locate the file.
- Windows: <Program Files>\National Instruments\PluginLibrary
Plug-In Library Settings
The following sections describes how to customize plug-in library behavior.
Changing
Maximum Upload Size
nipluginlibrary.webapi.exe --PLUGINLIBRARY:MAX_UPLOAD_SIZE=<bytes>
- To specify bytes, enter the number value, with no suffixes.
- To specify megabytes, use either MB or mb as a suffix.
- To specify gigabytes, use either GB or gb as a suffix.
PLUGINLIBRARY__MAX_UPLOAD_SIZE=<bytes>
Changing
the Default Host and Port
nipluginlibrary.webapi.exe --URLS=http://<host>:<port>
nipluginlibrary.webapi.exe --HTTP_PORTS=<port>
- The <host> value specifies where web requests can come from. The default value for this parameter is *. This value allows requests to come from anywhere. To restrict requests to the local host, use localhost.
- The <port> value specifies the port used. To assign ports
dynamically, use 0.Note You cannot use localhost when specifying dynamic port binding. Instead, use either 127.0.0.1 or [::1] to specify dynamic port binding for locally restricted requests.
Assigning Port and Host Addresses via Environment Variables
- To specify the host and port address, use URLS=http://<host>:<port>
- To specify only the port address, use HTTP_PORTS=<port>
Dynamic port that accepts requests from
anywhere
nipluginlibrary.webapi.exe --URLS=http://*:0
Single port that only accepts local
requests, with a mamixum upload size of 300 MB
nipluginlibrary.webapi.exe --URLS=http://localhost:43102 --PLUGINLIBRARY:MAX_UPLOAD_SIZE=300mb
Plug-In Library Configuration Files
Plug-in library settings can be configured using configuration files. Refer to the following sections for information on how to create and use configuration files to manage plug-in library settings.
Configuration File Format
The following code snippet shows the typical contents of a .JSON configuration file.
{ "URLS": "https://localhost:43207", "PLUGINLIBRARY":{ "MAX_UPLOAD_SIZE": "300mb" } }
Configuration File Name and Location
You must name your configuration file pluginlibrary.json.
- Windows: %localappdata%\National Instruments\PluginLibrary\pluginlibrary.json
- Linux: $HOME\.config\ni\pluginlibrary.json