for marketing api, know i'm able make 1 call retrieve of adsets account along insights, able specify date_preset insights edge in same call?
for example, following gives me lifetime insights stats:
/v2.4/{accountid}/adcampaigns?fields=insights
to clear - know possible retrieve making separate calls each adset id (where know can specify date_preset); instead, i'd via call long list of ad sets plus insights details in 1 go.
yes possible using query expansion, should not in anyway.
using query expansion results in multiple requests being executed in 1 http call, in case 1 adcampaigns, , n requests n number of adcampaigns returned. in turn affect rate limiting.
the efficient way request insights adcampaigns (ad sets) instead request them @ account level, specifying aggregation level:
/v2.4/act_{adaccount_id}/insights?date_preset=last_7_days&level=campaign this requires 1 request, or number of requests retrieve total number of pages.
if want achieve query expansion, can following example:
/v2.4/act_{adaccount_id}/adcampaigns?fields=insights.date_preset(last_30_days).time_increment(all_days) you can see parameters insights query parameters of form param_name=param_value in form of param_name(param_value).
Comments
Post a Comment