@ribitskiyb: This likely still has to do with the fact that there isn’t any data for this campaign for this time period. Please see the example requests, below.
The synchronous request (note: no segmentation_type yet, but we’ll get there):
$ twurl -H ads-api.twitter.com "/2/stats/accounts/8vjec?start_time=2017-04-11&end_time=2017-04-18&entity=CAMPAIGN&entity_ids=82sjq&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER"
{
"data_type": "stats",
"time_series_length": 1,
"data": [
{
"id": "82sjq",
"id_data": [
{
"segment": null,
"metrics": {
"impressions": [
59699
],
"tweets_send": null,
"qualified_impressions": null,
"follows": [
1
],
"app_clicks": null,
"retweets": null,
"likes": [
6
],
"engagements": [
78
],
"clicks": [
76
],
"card_engagements": null,
"poll_card_vote": null,
"replies": [
1
],
"url_clicks": [
14
],
"carousel_swipes": null
}
}
]
}
],
"request": {
"params": {
"start_time": "2017-04-11T04:00:00Z",
"segmentation_type": null,
"entity_ids": [
"82sjq"
],
"end_time": "2017-04-18T04:00:00Z",
"country": null,
"placement": "ALL_ON_TWITTER",
"granularity": "TOTAL",
"entity": "CAMPAIGN",
"platform": null,
"metric_groups": [
"ENGAGEMENT"
]
}
}
}
Now, we make the same request (no segmentation_type yet), using the asynchronous analytics endpoint. (We show the result after downloading the .gzip).
$ twurl -X POST -H ads-api.twitter.com "/2/stats/jobs/accounts/8vjec?start_time=2017-04-11&end_time=2017-04-18&entity=CAMPAIGN&entity_ids=82sjq&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER"
{
"data_type": "stats",
"time_series_length": 1,
"data": [
{
"id": "82sjq",
"id_data": [
{
"segment": null,
"metrics": {
"impressions": [
59699
],
"tweets_send": null,
"qualified_impressions": null,
"follows": [
1
],
"app_clicks": null,
"retweets": null,
"likes": [
6
],
"engagements": [
78
],
"clicks": [
76
],
"card_engagements": null,
"poll_card_vote": null,
"replies": [
1
],
"url_clicks": [
14
],
"carousel_swipes": null
}
}
]
}
],
"request": {
"params": {
"start_time": "2017-04-11T04:00:00Z",
"segmentation_type": null,
"entity_ids": [
"82sjq"
],
"end_time": "2017-04-18T04:00:00Z",
"country": null,
"placement": "ALL_ON_TWITTER",
"granularity": "TOTAL",
"entity": "CAMPAIGN",
"platform": null,
"metric_groups": [
"ENGAGEMENT"
]
}
}
}
Now that we’re confident that we can see results for this campaign for this time period, let’s add segmentation_type.
$ twurl -X POST -H ads-api.twitter.com "/2/stats/jobs/accounts/8vjec?start_time=2017-04-11&end_time=2017-04-18&entity=CAMPAIGN&entity_ids=82sjq&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&segmentation_type=LOCATIONS"
{
"data_type": "stats",
"time_series_length": 1,
"data": [
{
"id": "82sjq",
"id_data": [
{
"segment": {
"segment_name": "Israel",
"segment_value": "2edb6e240797c549"
},
"metrics": {
"impressions": [
712
],
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": null,
"engagements": null,
"clicks": null,
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": null,
"carousel_swipes": null
}
},
{
"segment": {
"segment_name": "Spain",
"segment_value": "ecdce75d48b13b64"
},
"metrics": {
"impressions": [
11446
],
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": null,
"engagements": [
13
],
"clicks": [
13
],
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": [
3
],
"carousel_swipes": null
}
},
{
"segment": {
"segment_name": "Portugal",
"segment_value": "8198e85105936d3c"
},
"metrics": {
"impressions": [
3675
],
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": null,
"engagements": [
7
],
"clicks": [
6
],
"card_engagements": null,
"poll_card_vote": null,
"replies": [
1
],
"url_clicks": [
1
],
"carousel_swipes": null
}
},
{
"segment": {
"segment_name": "Greece",
"segment_value": "2ee7eeaa84dbe65a"
},
"metrics": {
"impressions": [
5340
],
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": [
1
],
"engagements": [
5
],
"clicks": [
5
],
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": null,
"carousel_swipes": null
}
},
{
"segment": {
"segment_name": "France",
"segment_value": "f3bfc7dcc928977f"
},
"metrics": {
"impressions": [
11092
],
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": [
2
],
"engagements": [
12
],
"clicks": [
12
],
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": [
2
],
"carousel_swipes": null
}
},
{
"segment": {
"segment_name": "Italy",
"segment_value": "c799e2d3a79f810e"
},
"metrics": {
"impressions": [
5948
],
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": [
1
],
"engagements": [
13
],
"clicks": [
13
],
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": [
2
],
"carousel_swipes": null
}
},
{
"segment": {
"segment_name": "Turkey",
"segment_value": "682c5a667856ef42"
},
"metrics": {
"impressions": [
21481
],
"tweets_send": null,
"qualified_impressions": null,
"follows": [
1
],
"app_clicks": null,
"retweets": null,
"likes": [
2
],
"engagements": [
28
],
"clicks": [
27
],
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": [
6
],
"carousel_swipes": null
}
}
]
}
],
"request": {
"params": {
"start_time": "2017-04-11T04:00:00Z",
"segmentation_type": "LOCATIONS",
"entity_ids": [
"82sjq"
],
"end_time": "2017-04-18T04:00:00Z",
"country": null,
"placement": "ALL_ON_TWITTER",
"granularity": "TOTAL",
"entity": "CAMPAIGN",
"platform": null,
"metric_groups": [
"ENGAGEMENT"
]
}
}
}
I hope this helps clarify. Thanks!