How can I call the Wiki REST Api from an Azure DevOps extension?

梦想与她 提交于 2020-01-05 07:12:45

问题


The Add a dashboard widget tutorial explains how to call the work item REST API using a VSS.require("TFS/WorkItemTracking/RestClient")d rest client.

I want to do the same, but for the Wiki Rest API. There certainly is a scope for this: vso.wiki.

However, I cannot find the equivalent of "TFS/WorkItemTracking/RestClient" for wiki. Maybe it is as simple as "TFS/Wiki/RestClient", but even if it was, what are the names and parameters of the functions I can use? I don't find that documented anywhere, and I don't want to have to figure that out by trial-and-error, each time publishing a new extension and seeing if it works.

And looking at REST Clients, there does not even seem to be a Wiki Rest Client.

So how can I access the Wiki Rest API from an Azure DevOps extension? Is there perhaps an example somewhere, that google has been successful in hiding from me?


N.B. I do know about the REST API Specs, but the mapping to REST client is not self-evident and apparently.

I stumbled upon Azure DevOps Web API clients and contracts, however, a brief grep revealed it does not contain the latest and greatest (pre-release) "pagesBatch" feature, and I did not find a relevant branch / tag either.


回答1:


The wiki rest api documents for azure-devops-extension-api can be found here

You can also check the restful api for wiki here.

Check here to discover the client libraries for azure devops service rest api in different coding languages.

Hope above helps.



来源:https://stackoverflow.com/questions/59516510/how-can-i-call-the-wiki-rest-api-from-an-azure-devops-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!