Finding Out Basic Information about a Shared Variable
- Updated2025-08-15
- 1 minute(s) read
Required permission: VariableBrowse
To find out the name, type, and URL of a shared variable, you can browse the corresponding VariableObject. To browse a VariableObject, use the following URI format: http://[host]:[port]/nivariable/VariableObjects('[dynamic api url]')
For example, GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json
Follow the deferred children URI to view the Children property of the VariableObject.
For example, GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')/Children?$format=json
Use the $expand parameter to get the Children property represented inline without having to make a separate request to get the children. For example, GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json&$expand=children
To get only one property of a VariableObject, use the following URI format:
GET http://[host]:[port]/nivariable/VariableObjects('[dynamic api url]')/[specific property]
The available properties are Url, Type, and Name. For example, to get the type property of ni.var.psp://localhost, use the following URI:
GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')/type?$format=json