Platform

 View Only

 Apptio API, steering row count

Jump to  Best Answer
  • Datalink
Wojciech Wolanski's profile image
Wojciech Wolanski posted 02/27/24 03:25 AM

hi
If there is a large Apptio table/ report I know I can add on the end &rowCount=1000000000 in order to have all lines exported. 

Now, we make use of the API querying it from within a company's firewall with API user. 
I can see Postman is getting timeout if I want to retrieve table which is having over 1 mln rows. I do follow way of connecting pointed in here: API tutorial: Download and upload v.12 Cost Transparency table using Postman tool (apptio.com)  
Report we want to share via API is having over 5 mln rows. We do have success querying it using Python, but all we manage is to retrieve only bits of the report. 

Is there function in API URL similar to "&rowCount=1000000000" which could steer FROM and TO line number of the report ?
We would like to have few URLs exporting smaller chunks of the same report.

Edit: Answered by @Rene Norskov


#Datalink
Rene Norskov's profile image
Rene Norskov  Best Answer

Hi Wojciech

You can try using the paging functions &startingRow=#  and &rowCount=# to download the report in chunks.

You must make sure that the sort column is unique i.e. that the order of rows in the report is deterministic / can be predicted.

However, I’m a bit sceptical when you say it is timing out and I would recommend looking at the efficiency of the query and options to break it down in several smaller ones. 


#Datalink
Apptio Community Member's profile image
Apptio Community Member

The REST API v2 connector supports pagination, so you can use that to your advantage by including limit and offset values.

Personally I am not sure why you are still trying to use Datalink when you have working Python scripts. In my experience DataLink works great for retrieving small-medium size datasets. When I tried querying the Microsoft Graph API using a REST Connector, DataLink ultimately times out and fails because there were well over 1M records. The experience of DataLink is not great either because while the job is running all you see is an ambiguous status text with no progress bar or anything more granular like what it is actually doing in the moment. Why bother when a Python script does the trick? 


#Datalink
Wojciech Wolanski's profile image
Wojciech Wolanski

Thank you @Rene Norskov I think it might be a solution. We will be testing it this week.


@Jeff Cairns we are using user with API reading privileges  to download data from Apptio directly. Without having DL on Prem. I can see there is REST API v2 on the new data link. Do you mean it supports pagination reading data from the ApptioOne or from External systems? If from the Apptio, is there any new way of create APIs? Pagination doesn't seem to be supported currently.


#Datalink