Azure DevOps Usage - Get query ID

Whether you create a new query, or use an existing one, you will need to obtain the GUID for this query so that it can be used from inside the Power BI query or Power Apps Canvas.

This can be retrieved from the ADO API by executing the following request in a browser, or HTTP Client (e.g. Postman):

1
https://[instance-name].visualstudio.com/DefaultCollection/[project-name]/_apis/wit/queries/[path-to-query]

Where:

  • [instance-name] is the ADO instance name, or Organization name
  • [project-name] is the AOD project name
  • [path-to-query] is the path to the query e.g. “Shared Queries/Current Sprint/Product Backlog”

e.g.

1
https://endjin.visualstudio.com/DefaultCollection/PowerBI/_apis/wit/queries/Shared Queries/Current Sprint/Product Backlog/

The response will be in a format which the first “id” value is the GUID you can use.