必需权限:VariableBrowse

可浏览相关的VariableObject,找到共享变量的名称、类型和URL。使用下列URI格式定位VariableObjecthttp://[host]:[port]/nivariable/VariableObjects('[dynamic api url]')

例如,GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json

注: 上述范例命令仅返回JSON回复。如要返回XML,从URI命令中移除$format=json即可。

在URI后加上子项,可查看VariableObjectChildren属性。

例如,GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json

使用$expand,可直接获取Children属性,无需单独发出获取子项的请求。例如,GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json&$expand=children

使用下列URI格式获取VariableObject的一个属性:

GET http://[host]:[port]/nivariable/VariableObjects('[dynamic api url]')/[specific property]

可用的属性包括UrlTypeName。例如,如要获取ni.var.psp://localhosttype属性,使用下列URI:

GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')/type?$format=json