Hi,
I'm trying to get info for a customer via oauth credentials with cURL requests and I have some questions:
1) Can I get a list of accessible customers with some info(name/manager/test_account) with one API call, or I need to get a list of customers with listAccessibleCustomers method and then make an API call for each of customer that i retrieved?
2) Can I get a campaign performance report for a manager account? For example, I have a manager account with 2 linked client accounts and each of this accounts have a campaign. Can I get a full report with one API call or do I need to:
- get a list of clients
- get a report for campaigns by client
3) Can I define a metric data for a test account/campaign or maybe I can retrieve an empty fields? For example { "impressions": "0", "cpp": "0", ... }
4) Could you explain this behavior for me, please?
For a request like -
curl -X POST https://googleads.googleapis.com/v1/customers/<customer_id>/googleAds:search -d "query=SELECT campaign.name, campaign.status FROM campaign WHERE segments.date DURING LAST_30_DAYS" -H "Authorization: Bearer <access_token>" -H "developer-token: <developer_token>" -H "login-customer-id: <manager_id>" I'm getting a response -
{
"results": [
{
"campaign": {
"resourceName": "customers/
6869456495/campaigns/1767234946",
"name": "Website traffic-Search-1",
"status": "ENABLED"
}
}
],
"totalResultsCount": "1",
}
But when I'm adding a new field that can be without info(for example segments.device) -
curl -X POST https://googleads.googleapis.com/v1/customers/<customer_id>/googleAds:search -d "query=SELECT campaign.name, campaign.status, segments.device FROM campaign WHERE segments.date DURING LAST_30_DAYS" -H "Authorization: Bearer <access_token>" -H "developer-token: <developer_token>" -H "login-customer-id: <manager_id>" I get this response -
Can I get a response with available data(like campaign info from 1st request)?
Thanks!