pinterest / api-quickstart

Code that makes it easy to get started with the Pinterest API.
Apache License 2.0
119 stars 44 forks source link

What happened to the parameter `data_source`? #75

Closed nbro10 closed 1 year ago

nbro10 commented 1 year ago

It seems that the parameter data_source, which was available in v3 or v4, is no longer available in v5. Is this true?

I have made a request with this parameter (to this endpoint) and I get a 500 HTTP error with the following message

Something went wrong on our end. Sorry about that..

and code 12.

Has this parameter been replaced with another parameter? Or why was it removed?

For completeness, here's the description of the data_source parameter taken from the old docs

Either OFFLINE or REALTIME. Offline metrics have a long retention and are used for billing (source of truth). Realtime metrics have latest metrics (including today) but only have 72-hour retention. In addition, realtime metrics are expected to be an estimation and might be inexact.

davidchaiken commented 1 year ago

I noticed that change when writing the code for v5, and assumed that the previous data sources had been combined. I'll check with the development team on why the change was made.

davidchaiken commented 1 year ago

Here's the inside scoop on the data source change... Over the last few years, we've switched the data store that backs reporting to Apache Druid. Druid enabled our reporting systems to provide both recent and historical data in realtime, so we removed the data_source parameter.

Sorry about the 500 error. It happens when the API receives a parameter that it doesn't expect. We have a low-priority bug open to fix it, but are more excited about building new functionality and spending time interacting with developers like you.