Request:
From: 
https://developers.google.com/google-ads/api/docs/rest/example-workflow

curl --request POST 
'https://googleads.googleapis.com/v4/customers/{customer_id}/campaigns:mutate' 
\
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {authorization_code}' \
--header 'developer-token: {developer_token}' \
--header 'login-customer-id: {login-customer-id}' \
--header 'resolveWithFullResponse: true' \
--header 'x-goog-api-client=gl-java/1.8.0_181-google-v7 gapic/ gax/1.35.0 
grpc/1.16.1' \


--data-raw '{
  "operations": [
    {
      "updateMask": "campaign.status",
      "update": {
        "resourceName": "customers/{customer_id}/campaigns/{campaign_id1}",
        "status": "PAUSED"
      }
    },
    {
      "updateMask": "campaign.status",
      "update": {
        "resourceName": "customers/{customer_id}/campaigns/{campaign_id2}",
        "status": "PAUSED"
      }
    }
  ]
}'

Response:

./pause_campaign.sh
{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": 
"type.googleapis.com/google.ads.googleads.v4.errors.GoogleAdsFailure",
        "errors": [
          {
            "errorCode": {
              "fieldError": "REQUIRED_NONEMPTY_LIST"
            },
            "message": "The required repeated field was empty.",
            "location": {
              "fieldPathElements": [
                {
                  "fieldName": "operations"
                }
              ]
            }
          }
        ]
      }
    ]
  }
}
./pause_campaign.sh: line 27: --data-raw: command not found

How am I supposed to pass data in curl???

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a57028e6-5cf7-4ebd-bb05-5fe8fea0dfben%40googlegroups.com.

Reply via email to