question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] az devops invoke doesn't support preview API versions

See original GitHub issue

Describe the bug I was trying to discover feed ids for our projects (since the feed ids I have to use for yaml pipelines aren’t easily discoverable) using the CLI, but it doesn’t support the preview API version I need: GET https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds?api-version=5.1-preview.1

To Reproduce Azure Cli Version: 2.0.76 Azure-Devops extension version: 0.17.0

Steps to reproduce the behavior: Try to invoke a preview API, for example:

az devops invoke --organization "https://feeds.dev.azure.com/{organization}/{project}" --area packaging --resource feeds --api-version "5.1-preview.1"

View the output:

could not convert string to float: '5.1.1'

Additional context The invoke command appears to be trying to convert the api-version into a float, even though it should just be left as a string.

Also, the invoke command also appears to be missing several URL parameters from the documented form: VERB https://{instance}[/{team-project}]/_apis[/{area}]/{resource}?api-version={version}. For example, team-project is necessary now for packaging, and I’m not sure if feeds. should be part of the {instance} or not. It would also be nice if I could just provide a full API url and have az devops invoke provide authentication for that url.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
PedroEsscommented, Dec 23, 2021

Issue is not solved. I am facing the same issue:

ERROR: could not convert string to float: '6.0.4'

Calling: https://dev.azure.com/{orgName}/_apis/serviceendpoint/endpoints?api-version=6.0-preview.4

2reactions
christofer-jacommented, Jun 22, 2022

Please consider re-opening this issue as the bug is still present with azure-cli 2.37.0 & azure-devops 0.25.0

I’ve also reported this at Visual Studio Feedback: https://developercommunity.visualstudio.com/t/az-devops-invoke-doesnt-support-preview/10077588?space=21&entry=problem&q=devops+invoke

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error creating Work Items via Az Devops API and Powershell
I create the HashTable in PowerShell, convert to JSON and use this as the body in the 'Invoke-RestMethod' command in the PowerShell script....
Read more >
Getting error while importing database in Azure China via ...
I am trying to import a database from the storage account using an Azure DevOps pipeline in Azure China, but getting an API...
Read more >
json - az devops invoke Call for creating inherited process
If I try this outside of AZ CLI and use straight up API Call, it works with this call. $createProcessURL = "$orgUrl/_apis/work/processes?api- ...
Read more >
the urban canuk, eh
Fear not, there's actually a built in az devops command " az devops invoke " that can call any Azure DevOps REST API...
Read more >
Getting started with Azure DevOps API with PowerShell
To access Azure DevOps Service Rest API, we need to send a basic ... )/properties?api-version=5.1-preview.1" (Invoke-RestMethod -Uri ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found