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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
bob57
Helper IV
Helper IV

Getting Data From Toggle Time Tracker and Pagination

Hello,

I've been tasked with getting all time entries from Toggle into Power Bi. Problem: Only 50 records are returned. Does anyone have experience with this and know how to retrieve all records? Or is there another preferred method? Below is the query and a link to the API documentation.

Thank you,

Bob

 

API Doc: https://developers.track.toggl.com/docs/

 

let
baseUrl = "https://api.track.toggl.com/",
// the token part can vary depending on the requisites of the API
accessToken = "Basic Mzg2MzQ1NGFlZGU3Nzg3YWE5MzE0ZjU0ZGU4NmRkNjk6YXBpX3Rva2Vu",
postData = Json.FromValue([start_date = #date(2023,1,1)]),
options = [
Headers = [Authorization = accessToken, #"Content-Type" =
"application/json;"], RelativePath ="reports/api/v3/workspace/{workspace_id}/search/time_entries",
Content = postData
],
Source = Web.Contents(baseUrl, options),
// since Web.Contents() doesn't parse the binaries it fetches, you must use another
// function to see if the data was retreived, based on the datatype of the data
parsedData = Json.Document(Source)
in
parsedData

 

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

Looking at the Project page of that site shows at least that API method supports pagination.

 

ppm1_0-1682166068553.png

 

Perhaps the Workspaces one does too. You can either try it with pagination and List.Generate, or create a list of ids to be used as a start id for the next 50 records, as described in this video.

Power BI - Tales From The Front - REST APIs - YouTube

 

Pat

 

Microsoft Employee

Thank you for taking the time to respond. What I learned:

1) /pagination is not supported with Workspaces.

2) The video was very informative and I learned from viewing it, but I haven't found a way for the total number of records to be returned, so I'm not sure that creating a list of ids in a multiple of 50 would offer benefit.

Again, thank you for your time. My search continues.

Bob

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.