Hello,

When working with JSON REST and curl, I find it easier myself to actually stick 
to the protos and build the operations from there. For example, this time I 
referenced campaign_criterion and criteria to find all the relevant fields. The 
campaign_criterion shows that I need a campaign that is a string, a status that 
is an enum, which we can pass as a string, and a criteria. With one_of fields, 
you refer to the actual name of the inner field when setting it in the JSON. 
Since the object I'm creating is an IpBlockInfo, I looked up the requisite 
field for that object in the criteria proto. The end result JSON looks like 
this:

{
customer_id: "1234567890",
operations: [
{
create: {
campaign: "customers/1234567890/campaigns/1234",
status: "ENABLED",
ip_block: {
ip_address: "127.0.0.1"
}
}
}
]
}

Obviously you will need to customize the IDs and IP addresses to suit your 
needs, and you should be able to adapt this general format to any request if 
you look through the protos for the fields you need.

Regards,
Mike, Google Ads API Team
ref:_00D1U1174p._5001UAq6wm:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/qvif9000000000000000000000000000000000000000000000PRWN2H00L0OBvXTVTgqMwsqrG3lQ3g%40sfdc.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to