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,510 points
382 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,280 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
• 41,990 points
79 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,240 points
36 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
• 41,990 points
516 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
• 41,990 points
346 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
205 views
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,280 points
56 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,280 points
46 views