I have two questions:
- First question:
In document Asynchronous Analytics: POST /stats/jobs/accounts/:account_id https://developer.twitter.com/en/docs/ads/analytics/api-reference/asynchronous.html#post-stats-jobs-accounts-account-id.
I see 2 params “entity” and “entity_ids”. So, I want to confirm that:
- If entity is CAMPAIGN => entity_ids is the list of campaign_id
- If entity is LINE_ITEM => entity_ids is the list of line_item_id
- If entity is PROMOTED_TWEET => entity_ids is the list of promoted_tweed_id
Is it correct?
- Second question:
I am currently get report for tweet. The main flow is below steps:
Step 1. GET accounts/:account_id/promoted_tweets
Step 2. Loop list of promoted_tweets which get at step 1.
- Create job id using request Asynchronous Analytics: POST /stats/jobs/accounts/:account_id with params:
. entity_ids = entity_ids (promoted_tweet_id)
- Then, I will get job_url from responsed job_id using Asynchronous Analytics: GET /stats/jobs/accounts/:account_id
My question is:
- As you see above flow, I loop all promoted_tweets. But in step 2 when I create job_id, I only want to get report data for tweets in specified range (start_time -> end_time).
- The problem is the loop for all promoted_tweets will take so much time and so much request (rate limiting) for unnecessary promoted_tweets that has no report or not used any more in specified range (start_time -> end_time).
- The problem will be solved if when I create job_id by Asynchronous Analytics: POST request, “entity_ids” param is not required when create job_id. But at present, it is required https://developer.twitter.com/en/docs/ads/analytics/api-reference/asynchronous.html#post-stats-jobs-accounts-account-id.
- So, can you tell me the best way to get report for only promoted_tweets in specified range (start_time -> end_time) like we create job_id without “entity_ids” param.
Thank you every body.