Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
artemus
Microsoft Employee
Microsoft Employee

HowTo: import data from devops (VSTS) git repo

If you ever wanted to pull items from your Devops (VSTS) repo here is how:

// Branch
"master" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true]

// MytableFromGit
let
    Source = VSTS.AccountContents("https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repo}/items?path={path}&version=" & Branch & "&download=true&api-version=5.0")
in
    Source

Replace the following with your values:

{organization}

{project}

{repo}

{path}

 

You can edit the Branch parameter to a different branch for testing

 

After you load the query, you will need to "Open As" into csv/json/xml

 

VSTS API link: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/items/get?view=azure-devops-rest-5.0

1 ACCEPTED SOLUTION
artemus
Microsoft Employee
Microsoft Employee


@artemus wrote:

If you ever wanted to pull items from your Devops (VSTS) repo here is how:

// Branch
"master" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true]

// MytableFromGit
let
    Source = VSTS.AccountContents("https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repo}/items?path={path}&version=" & Branch & "&download=true&api-version=5.0")
in
    Source

Replace the following with your values:

{organization}

{project}

{repo}

{path}

 

You can edit the Branch parameter to a different branch for testing

 

After you load the query, you will need to "Open As" into csv/json/xml

 

VSTS API link: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/items/get?view=azure-devops-rest-5.0


 

View solution in original post

4 REPLIES 4
kva-sell
Regular Visitor

This is great! Thanks for sharing

artemus
Microsoft Employee
Microsoft Employee


@artemus wrote:

If you ever wanted to pull items from your Devops (VSTS) repo here is how:

// Branch
"master" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true]

// MytableFromGit
let
    Source = VSTS.AccountContents("https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repo}/items?path={path}&version=" & Branch & "&download=true&api-version=5.0")
in
    Source

Replace the following with your values:

{organization}

{project}

{repo}

{path}

 

You can edit the Branch parameter to a different branch for testing

 

After you load the query, you will need to "Open As" into csv/json/xml

 

VSTS API link: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/items/get?view=azure-devops-rest-5.0


 

Anonymous
Not applicable

im getting a token Eof  error in "let"

v-juanli-msft
Community Support
Community Support

Hi @artemus 

Thanks for sharing your knowledge and experience importing data from devops (VSTS) git repo with Power BI.

To make your solution found by more people and more quickly,

i would suggest you to reply to yourself with your original post content and mark your answer as a solution.

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.