Get the team backlog using TFS REST API - rest

Is there a REST API I can call to retrieve the backlog (as in "the list of work items on the backlog") for a particular team in TFS?
I have found that TFS uses a private API to retrieve the content, but I am not particularly confortable using it since it is not documented.
Btw, the private API in question is
[project]/[team]/_api/_backlog/payload?__v=5&level=Stories&includeParents=false

I've tested this API on my side, it does get all information on Backlog site. Although it is not documented, you can use it to get information you want.

Related

When should you not use GitHub GraphQL API?

Much has been written about the benefits of the GitHub GraphQL API. And this is a really great technology. The only thing I can't figure out is in what situations is it still better to use the good old REST API v3?
Github GraphQL API is subject to the following caveats:
GraphQL API can only be accessed using authentication. You need a token to use this API. Thus, you can't use GraphQL in an environment where you can't secure the provisioning of this token. For example, in a web app without github authentication. This is a big caveat, especially for people who want to create web app or scripts that target only public repository informations.
Searching commits and code using the search API is not possible in Github Graphql. Only searching repos, issues and users are supported (for the search API)
some features like comparing commits and getting contributors are not possible yet in Graphql. Another example: you can't recursively get a tree using GraphQL API
some mutations already available in v3 may not yet have been implemented in GraphQL (create commit, create tag, create branch etc...), checkout mutations documentation

Can You Get Project Startdate from Azure DevOps REST API?

I'm trying to query the Azure Devops REST API to see when a project first came into existence and, perhaps, who created it. I'm using the link below and my results do match the documentation which, unfortunately, doesn't include create date. Is there any other ways to query AzDo REST API to get this data?
https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/get%20project%20properties?view=azure-devops-rest-5.1
I am afraid there is no rest api to get the start date of project. The start date property is not included in the returned results of Get Project Api.
This issue has been reported to Microsoft develop team. You can vote up this thread or submit a new feature(Click Suggest a feature and choose Azure Devops).

Azure Devops - How to get published information of a wiki page using Rest API

I referred this Microsoft document "MS Rest API documentation for wiki" and was able to get all the pages available in wiki. I was trying to get the published author and published time related information for which there is no available reference.
Is there any Azure DevOps Rest API available to get this information?
Azure Devops - How to get published information of a wiki page using Rest API
I am afraid there is no such REST API at this moment, however you can track it by tools such as Fiddler or press F12 in Chrome browser then select Network.
On the web UI, we could access the View revisions of the Wiki:
We could get the history of this Wiki:
Then we press F12 and click the first history, we could get the REST API like below:
https://dev.azure.com/<OrganizationName>/<ProjectName>/_apis/git/repositories/<WikiName>/Commits/<CommitsId>?
But, if we want to automate it by REST API, This seems impossible at the moment.
To automate it, we need to get the first commit ID for the Wiki, I could use the REST API:
https://dev.azure.com/<OrganizationName>/<ProjectName>/_apis/git/repositories/<WikiName>/Commits/?
Now, I could get the all the commits, but those commits for all Wiki files, and there are no other parameters that can be used to filter out which wiki document the commit is associated with. So, we could not get the first commit for each wiki automatically. That is the current limitation.
Hope this helps.
You can get commits from specific pages: searchCriteria.itemPath=
Here is doc:
https://learn.microsoft.com/en-us/rest/api/azure/devops/git/commits/get-commits?view=azure-devops-rest-6.0
Wiki page path will be: /WikiName/Folder--Name/Page-Name.md
Keep in mind that space in page name or folder name you need to replace with '-'. Also add extension to the page '.md'

Is there a complete list of sharepoint online rest api from official docs?

As title said, Is there a complete list of sharepoint online rest api from official docs?
I've done some research. However from the MS docs I can only find Complete basic operations using SharePoint REST endpoints and Get to know the SharePoint REST service.
Or maybe there just isn't one for the current Sharepoint Online implementation from official docs which have REST api reference and samples.
I was consider using MS graph as well, however it seems at the moment, the operations exposed by the Graph for SharePoint are very limited when compared to the native SharePoint REST API.
If there is a list, please share.
REST APIs of SharePoint are conformed to the specification of OData, we can use it like we use other OData APIs.
Here you go:
REST API reference and samples
More information about OData, we can refer to: OData - the best way to REST
If you have been authenticated (e.g. have an access token) and you can use the SharePoint API, then you can get a list of available endpoints for GET requests:
https://[tenant].sharepoint.com/[site]/_api/Web
The first part of the response provides a list of endpoints that you can explore further. [site] can be requested at any level (there can be many subsites below).
For example:
https://[tenant].sharepoint.com/[site]/_api/Web/SiteUsers
will allow you to display a list of users on a site and other possible endpoints, and
https://[tenant].sharepoint.com/[site]/[subsite]/_api/Web/Lists
will display all the lists that belong to the given subsite.
Unfortunately, I was not able to get a list of endpoints for POST requests such as: _api/web/lists/getByTitle('Documents')/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true)

VSTS Release API Documentation

In the following post uses the VSTS release API to get all the work items associated with a release: VSTS find workitems between two releases
It uses the following call:
https://{account}.vsrm.visualstudio.com/[teamproject]/_apis/Release/releases/{current release id}/workitems?api-version=4.1-preview.1&baseReleaseId={compare release id}
workitems isn't listed in the VSTS API documentation: https://learn.microsoft.com/en-us/rest/api/vsts/release/releases/get%20release?view=vsts-rest-4.1
Is there a more complete list available that I simply can't find? Is it possible to get the list of commits similar to:
Most of the REST APIs are documented here : Visual Studio Team Services REST API Reference
However some related REST APIs are not documented. For these REST APIs we can use tools such as Fiddler or directly press F12 - network in Chrome to track them.
Based on my test, no such a REST API can directly retrieve the compared commits from Release. Actually the different commits are retrieved by several REST APIs, get information from corresponding changesets then compare them...
So, if you want to get the different commits with REST API, you need to retrieve the changeset ID from previous release and the changeset ID in current release. then compare them.
e.g:
POST : https://{account}.visualstudio.com/{project}/_api/_versioncontrol/history?api-version=5.0-preview.1
Request Body:
{"repositoryId":"","searchCriteria":"{\"itemPaths\":[\"$/0522TFVCScrum/PS\"],\"fromVersion\":\"180\",\"toVersion\":\"183\",\"top\":50}"}