using Release Definition REST API for VSTS

0 votes

I've been using release definition API on update 3 of TFS 2015 using API version 3.0-preview1 on a prem instance. But since I've started testing on VSTS, I'm getting 404 not found error saying:

Page not found And a long block of HTML.

I'm using powershell to call API which I created using Personal Access Token and alternate credential method: https://fabfiber.vsrm.visualstudio.com/DefaultCollection/ff213d65-d61d-447c-b39d-d16f21b18364/_apis/release/definitions?api-version=3.0-preview.1

Can someone let me know if I am missing something.

Am I doing something wrong here? Any help please.

Jul 24, 2018 in Other DevOps Questions by Damon Salvatore
• 5,980 points
1,252 views

1 answer to this question.

0 votes

Try using this:

$vstsAccount = "[your vsts name]"
$user = "test"
$accessToken="[personal access token]"
$teamProject="[team project name]"
Function QueryWorkItem{
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$accessToken)))
 $uri="https://$vstsAccount.vsrm.visualstudio.com/defaultcollection/$teamProject/_apis/release/definitions?api-version=3.0-preview.1"
$result = Invoke-RestMethod -Uri $uri -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}
}
answered Jul 24, 2018 by ajs3033
• 7,300 points

Related Questions In Other DevOps Questions

0 votes
1 answer

SonarQube cannot connect to JIRA 7 with REST API

The JIRA Plugin is not compatible with JIRA 7 ...READ MORE

answered Jul 5, 2018 in Other DevOps Questions by Kalgi
• 52,350 points
1,018 views
0 votes
1 answer

What is the best practice for updating an already existing web app deployment using ARM?

The Service Principal solution, through the SDK, ...READ MORE

answered Jul 9, 2018 in Other DevOps Questions by Atul
• 10,240 points
614 views
+1 vote
1 answer

tf.exe authenticate for vsts

You can use the Check in changes ...READ MORE

answered Jul 25, 2018 in Other DevOps Questions by Kalgi
• 52,350 points
2,306 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
0 votes
1 answer

Copy log files to local machines using Jenkins

Try initializing the variables with values according ...READ MORE

answered May 2, 2018 in Other DevOps Questions by ajs3033
• 7,300 points
1,719 views
0 votes
1 answer

Base a stage in pipeline by using a preloaded template

I don't think it's possible to load ...READ MORE

answered Jul 11, 2018 in Other DevOps Questions by ajs3033
• 7,300 points
893 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP