Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Add a Metadata Filter to a vco Query

$
0
0

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 expressionOrgVal1 = new VclExpression(VclQueryOrgField.DISPLAYNAME, "Mr*", VclExpressionType.EQUALS);

 

////??/////var expressionOrgVal2 = new VclExpression(VclQueryOrgField.value, "metadata@SYSTEM:first==STRING:world", VclExpressionType.EQUALS);

 

var expression = new Array(expressionOrgVal1, expressionOrgVal2);

 

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

 

//var filter = new VclFilter(expressionOrgVal1);

var params = new VclQueryParams();

var orgRef = new VclReference();

params.setFilter(filter);

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


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>