When trying to retrieve all negative keywords from shared sets I have a predicate for campaign ID's (I want to get the shared sets that belong only to these campaigns)
I have noticed that if there are no shared sets for the campaigns in the list it returns an error instead of returning an empty result. How can this be run on accounts where I do not know in advance if there are shared sets for specific campaigns?
this is the error:
WebFault: Server raised fault: '[SelectorError.MISSING_PREDICATE_VALUES @ selector]'
when running:
shared_criterion_service = client.GetService('SharedCriterionService',
version='v201607')
campaign_shared_set_service = client.GetService('CampaignSharedSetService',
version='v201607')
shared_set_ids = []
criterion_ids = []
selector = {
'fields': ['SharedSetId', 'CampaignId', 'SharedSetName', 'SharedSetType',
'Status'],
'predicates': [
{
'field': 'CampaignId',
'operator': 'IN',
'values': [campaigns]
},
{
'field': 'SharedSetType',
'operator': 'IN',
'values': ['NEGATIVE_KEYWORDS']
}
],
'paging': {
'startIndex': 0,
'numberResults': PAGE_SIZE
}
}