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

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'

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

How does Jira confluence software talk to Github server?

So, As github is deprecating authorization through access_token query param, we were sent a mail from github that a call has been made with access_token in query param and were asked to update things to include authorization info in request headers.
We are suspecting that the api call is made from Jira confluence app from the github integration that was done by admin which we don't have control over.
So, just trying to debug things here. Does anyone know how Jira confluence internally communicates with Github servers using access_token to update pull requests and commits etc in Jira tickets?
If this is not the correct domain for this please move it to the right one.
It is very possibly the Github/Jira integration. This bug ticket was resolved in August but based on the comments there it's not completely fixed or released.
This issue has some back-and-forth but this comment clears things up: it looks like GitHub recommends uninstalling the old Jira integration and using the one GitHub maintains instead.

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).

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}"}

Get Pipeline Value of GitHub Issues?

I use ZenHub to manage my Issues on GitHub.
When I go to the detail of an issue I can see the property "pipeline" in GitHub which is exactly the column where the Issue is saved.
Now I want to get the pipeline information out of my issues using the API of GitHub. But none of the Issue-Methods
GET /repos/:owner/:repo/issues or GET /repos/:owner/:repo/issues/:number seem to have any information about the pipeline. Is it hidden anywhere else?
Pipeline is purely a ZenHub feature.
As such, it is not exposed in the Github API Issues (or in any other GitHub API)
A ZenHub public API is in the making (issue 172).
Update: The API is available: ZenHub API
With the Github API v4, you can query the combinedContexts of a commit to retrieve a list of status contexts and check runs for the commit triggering your pipelines.