Getting profile information from tfs REST API showing Page not found - rest

Am sure this might have been asked before.I have searched like anything not getting any information thats why i thought of posting here. any help is appreciated
https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=1.0
this REST API always giving Page not found tfs2015 server using.

The REST API you mentioned is for VSTS :
https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=1.0
For on-premise TFS (TFS 2015 in your case), you can use below REST API to get the profile information (connect to TFS first):
http://server:8080/tfs/_api/_common/GetUserProfile?__v=5

Related

Microsoft Project Online - Rest API Get Token

I want to read projects and tasks from my Laravel application from Microsoft Project Online.
I've searched everywhere and couldn't find a documentation on how to login/authenticate my users.
Users on my web app should be able to link their Microsoft Project Online site url, and authenticate to fetch their tasks.
How can I obtain a bearer token to execute REST api? Please lead me to a documentation that does so I'm lost.
Thank you

Updating Azure DevOps Environment Resource Tags through the API

I am trying to figure out how to update the associated tags with an Azure DevOps Environment Resource (virtual machine) through the Azure DevOps API.
I have figured out how to get the resources for a specific Environment - https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}?api-version=6.0-preview.1
However, if I try to update and then post back the Environment JSON with the updated resource tags, it does not actually update the resources. I think it is only for updating the Environment Name and Description?
I have trying to figure out how to use the following API endpoint (I think this is the one I should be using?) - https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}/virtualmachines?api-version=6.0-preview.1.
The API endpoint wants a "resourceId" but I am not able to get anything back besides a 404 error when I put in the Environment Resource Id's for my Environment. I am not sure if I am doing something wrong, or this is the wrong end point.
Does anyone have an experience with using the API to update resource tags?
I can reproduce above issue. Currently, You have to manually edit the Environment Virtual machine Resource Tags.
Azure devops Environment Resource Rest API is not fully developed yet. Some features may be broken and unavailable currently.
You can report this issue to Microsoft Development Team. Hope they will fix it in the future sprint.

How to access Azure DevOps deploy comments from REST API

I've been able to successfully access all kinds of details around a release in Azure DevOps by leveraging the .NET client libraries (ex: Microsoft.VisualStudio.Services.Release.Client) that wrap the REST API. However, I can't seem to find what the object/property combination is that I would use to retrieve the comments that can be entered when kicking off a deployment to a specific environment.
To be clear, the comments I'm looking for are entered by hovering over an environment of a release and selecting "Deploy". On the right hand side there is a dialog in which comments can be entered and then another "Deploy" button is selected to kickoff the deployment.
Does anyone have any ideas on how these deployment comments can be read by using the Azure DevOps REST APIs or .NET client libraries?
You can use get release history REST API to get deploy comments:
Get https://vsrm.dev.azure.com/{Organization name}/{Project name}/_apis/Release/releases/{Release Id}/history?api-version=6.1-preview.1
Here is my sample:

Microsoft TFS Rest API for repository list does not return ssh URLs

TFS server version: 2017
Compatible API version <= 3.0
The Rest API endpoint to fetch the information for tfs-git repositories is mentioned here:
[https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-4.1]
This returns the HTTP clone links for the repositories but not the ssh URL. Also, the documentation does not mention any API option to get the same.
Is there for API not including the ssh URLs?
Again, this isn't visual studio but TFS server.
Are sure this is the case, as if I call.
https://dev.azure.com/PeterLai0838/_apis/git/repositories?api-version=5.1
i get
"remoteUrl":"https://PeterLai0838#dev.azure.com/PeterLai0838/roboops/_git/roboops",
"sshUrl":"git#ssh.dev.azure.com:v3/PeterLai0838/roboops/roboops",
"webUrl":"https://dev.azure.com/PeterLai0838/roboops/_git/roboops"}]
Ah wait, i notice your using the 4.1 api, maybe use the 5.1?
sshURL is supported in TFS 2018 and later. You may submit a feature request at website below:
https://developercommunity.visualstudio.com/content/idea/post.html?space=22

Get Branching Model in bitbucket server via REST

Someone knows how I can GET the PROJECT's branching model via REST API. Not the repository. I can not find how to do it anywhere.
In bitbucket server I find it via web at https://mybitbucket.com/plugins/servlet/branchmodel/projects/{project-key}
I found it:
Is not in the actual version of REST API Documentation
(https://docs.atlassian.com/bitbucket-server/rest/5.14.0/bitbucket-rest.html)
Then, you can do GET request to:
https://mybitbucket.com/rest/branch-utils/1.0/projects/{project-key}/branchmodel/configuration