I have attempted to delete all recent analytics jobs ids I had available. All of those delete requests failed because the jobs were not in ‘processing’ state. This also brought to my attention that we haven’t successfully created an analytics job for this ad account in many days (139 to be exact). So this account has had these 100 zombie jobs for a long time.
I was asked to include the request and response for the GET stats/jobs/accounts/18ce54auygc endpoint. I just follow the cursors to collect the job statuses I listed above.
'request': {'params': {}},
'next_cursor': '1031903674837041152',
'data': [{'start_time': '2018-04-10T15:00:00Z',
'segmentation_type': None,
'url': None,
'id_str': '1031904679821635589',
'entity_ids': ['1o9ihz'],
'end_time': '2018-04-11T15:00:00Z',
'country': None,
'placement': 'ALL_ON_TWITTER',
'id': 1031904679821635589,
'expires_at': None,
'account_id': '18ce54auygc',
'status': 'CANCELLED',
'granularity': 'HOUR',
'entity': 'PROMOTED_TWEET',
'created_at': '2018-08-21T14:03:42Z',
'platform': None,
'updated_at': '2018-08-21T14:04:39Z',
'metric_groups': ['ENGAGEMENT',
'BILLING',
'VIDEO',
'MEDIA',
'WEB_CONVERSION',
'MOBILE_CONVERSION']},
{'start_time': '2018-04-10T15:00:00Z',
'segmentation_type': None,
'url': None,
'id_str': '1031904679041556480',
'entity_ids': ['1mtib8'],
'end_time': '2018-04-11T15:00:00Z',
'country': None,
'placement': 'ALL_ON_TWITTER',
'id': 1031904679041556480,
'expires_at': None,
'account_id': '18ce54auygc',
'status': 'CANCELLED',
'granularity': 'HOUR',
'entity': 'PROMOTED_TWEET',
'created_at': '2018-08-21T14:03:42Z',
'platform': None,
'updated_at': '2018-08-21T14:04:39Z',
'metric_groups': ['ENGAGEMENT',
'BILLING',
'VIDEO',
'MEDIA',
'WEB_CONVERSION',
'MOBILE_CONVERSION']},
....ad infinitum