Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 192300

vCD query service and metadata filters

$
0
0

I am stealing this question from an older post since they did such a succinct job in stating their question.  Basically I cannot figure out how to format the filter expression for querying the metadata field.  I have plans to make some heavy use of the metadata but not being able to use the query service against it will be a major bummer.  I don't want to be forced to use a rest call I would much prefer staying in the vCO if at all possible.

 

Add a Metadata Filter to a  VCO Query - how to use vco vcfilter ?? If there is a way I need the syntax to be able to use the below call.

I have to make a search based on key and value.

 

vcd rest call:

https://x.x.x.x/api/query?type=organization&format=records&fields=metadata@SYSTEM:first&filter=metadata@SYSTEM:first==STRING:world

 

vco:

 

what will be the expression for metadata??

 

var expressionOrg1 = new VclExpression(VclQueryOrgField.DISPLAYNAME, "*", VclExpressionType.EQUALS);

var expressionOrgMeta = ?? (need for metadata)

 

var expression = new Array(expressionOrg1, expressionOrgMeta);

 

var filter = new VclFilter(expression,VclFilterType.AND);

 

var params = new VclQueryParams();

var orgRef = new VclReference();

params.setFilter(filter);

params.addMetadataField("first", VclMetadataDomain.SYSTEM);


Viewing all articles
Browse latest Browse all 192300

Trending Articles