NSX Group displays a tag prepended with a pipe symbol (|) in the "value" field when querying the Group via API
search cancel

NSX Group displays a tag prepended with a pipe symbol (|) in the "value" field when querying the Group via API

book

Article ID: 424935

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • Tag is created via UI.


  • Group is created via UI.  


  • Tag is used as membership criteria for a group. 
    Scope is blank.


  • Full GET API output for the group. 
    https://<NSX-Manager>/policy/api/v1/infra/domains/default/groups/TestGroup
    The tag name in the value field has a "|" prepended. 

  • Modifying or creating a group via API allows user to enter a value without a "|" in the "value" field
    PATCH  https://<NSX-Manager>/policy/api/v1/infra/domains/default/groups/TestGroup1



Environment

VMware NSX 

Cause

The "value" field can have a different format depending on whether it has been created from UI or API. 

For the "value" field, the format is : 
"<scope>\|<tag>"

Using the examples above:  

The scope value is not defined and is empty 

"value": "|TagTest" when created via UI

"value"; "Test" when created via API 

 

Resolution

This is expected behaviour and working as designed.