Recherche d'informations de base sur une variable partagée
- Mise à jour2025-08-27
- Temps de lecture : 1 minute(s)
Autorisation requise : VariableBrowse
Pour connaître le nom, le type et l'URL d'une variable partagée, vous pouvez parcourir l'objet VariableObject correspondant. Pour parcourir un objet VariableObject, utilisez le format d'URI suivant : http://[hôte]:[port]/nivariable/VariableObjects('[url d'api dynamique]')
Par exemple, GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json
Suivez les URI enfants reportés pour afficher la propriété Children de l'objet VariableObject.
Par exemple, GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')/Children?$format=json
Utilisez le paramètre $expand pour obtenir la propriété Children dans la réponse sans avoir à faire une demande séparée. Par exemple, GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')?$format=json&$expand=children
Pour n'obtenir qu'une propriété d'un objet VariableObject, utilisez le format d'URI suivant :
GET http://[hôte]:[port]/nivariable/VariableObjects('[url d'api dynamique]')/[propriété spécifique]
Les propriétés disponibles sont Url, Type et Name. Par exemple, pour obtenir la propriété type de ni.var.psp://localhost, utilisez l'Url suivante :
GET http://my_server:3580/nivariable/VariableObjects('ni.var.psp://localhost')/type?$format=json