splunk / splunk-add-on-microsoft-azure

Splunk Add-on for Microsoft Azure
Apache License 2.0
11 stars 9 forks source link

Azure Billing API Pagination Issue #20

Closed cramasta closed 1 year ago

cramasta commented 2 years ago

The Azure billing API returns a max of 1000 events per requested timeframe. If there are more than 1000 events the response will also include a skipToken value that contains that has the url for the next page of results to request. The issue Im seeing is that I am only ever able to pull back 1000 events for a single timeframe.

The code for checking for the pagination skipToken url is

if '@odata.nextLink' in response_json: nextLink = response_json['@odata.nextLink']

However from my testing with the API I am seeing that the field being returned is called nextLink, not @odata.nextLink. So even though there is a URL with the next page of results to request the code above is skipping over it.

JasonConger commented 1 year ago

Addressed in 4.0.3