Reputation: 5257
A developer has created a plugin where each task in devops has a set of checkboxes that needs to be se before closing a task. We have been redirected to this article for how it was implemented:
https://learn.microsoft.com/en-us/azure/devops/extend/develop/data-storage?view=azure-devops
I am trying to get all the values into a another system we have so we can monitor how many checkboxes has been checked.
When I call this I can find the extension in the list: https://extmgmt.dev.azure.com/xxx/_apis/extensionmanagement/installedextensions?api-version=5.1-preview.1
But I need to find all the data. I cant find anything in the documentation on how to get the data trough the REST API. I can see you can store a simple and a complex data type. And you can get a single value trough javascript. But how do you get all the values from REST API?
Upvotes: 1
Views: 192
Reputation: 30353
The document How settings are stored says the settings are stored as documents internally. And the collection name is always the special name '$settings', while storing the settings as documents.
So you can have a try to get all the settings using the get all documents method under the special collection $settings
.
VSS.getService(VSS.ServiceIds.ExtensionData).then(function(dataService) {
// Get all document under the collection
dataService.getDocuments("$settings").then(function(docs) {
console.log("There are " + docs.length + " in the collection.");
});
});
You can also try below api:
GET _apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/User/Me/Collections/%24settings/Documents
Upvotes: 0