Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the list of "extended properties" to use in the PropertyFilters parameter of the Azure Devops Release Api

I'm building some tooling for my release pipelines using the Azure Devops sdk for making calls to the rest api.

I see in the documentation that there is an option to filter properties.

A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included.

This seems to presuppose that the caller knows the ids (assuming property names?) by which to filter, but the documentation makes no allusions as to which properties are available. Since the KVP object is empty w/o valid property ids, and only contains values for those ids, this seems like a tribal knowledge problem.

Where is the list of properties to which this documentation is referring?

Update

An example of an attempt at the answer given by @Merlin Liang - MSFT

using (var connection = new VssConnection(new Uri(BasePath), _credentialsFactory.GetCredentials()))
            {
                var releaseClient = connection.GetClient<ReleaseHttpClient>();

                var releasesTask = releaseClient.GetReleasesAsync(Project,
                                                                  releaseDefinitionId,
                                                                  expand: ReleaseExpands.Environments
                                                                          | ReleaseExpands.Approvals
                                                                          | ReleaseExpands.Artifacts, 
                                                                  propertyFilters: new []{"DeploymentStatus"});
                releasesTask.Wait();
                return releasesTask.Result;
            }

This request returns the following: enter image description here

You can see that I am able to provide the flags for ?expand={PropertyExpands} and I am getting those objects back, but the properties collection stays empty.

like image 964
Josh Gust Avatar asked Oct 18 '25 13:10

Josh Gust


1 Answers

Where is the list of properties to which this documentation is referring?

Need to say that there are much description which very easily misleading users in the doc. In fact, Definitions is the properties mentioned to.

enter image description here

But, I am very afraid that users will be mislead by the name propertyFilters.

The things you need to watch out for is, propertyFilters does not mean filter based on release object properties. It just used for expand the result. In one word, it just specifies a list of extended properties which the user want it included in the results.

See this github issue: https://github.com/Microsoft/azure-devops-node-api/issues/182

like image 192
Mengdi Liang Avatar answered Oct 21 '25 09:10

Mengdi Liang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!