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,250 points
214 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,000 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
• 35,750 points
31 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 8, 2018 in Other DevOps Questions by Atul
• 10,200 points
23 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
• 35,750 points
287 views
+1 vote
1 answer

Import build/release json export files to tfs source control through API

The APIs of "Import build/release definition json ...READ MORE

answered Jul 25, 2018 in Other DevOps Questions by Kalgi
• 35,750 points
211 views
+13 votes
2 answers
0 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,000 points
34 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,000 points
31 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.