Hi all, I'm posting this for the second time since the previous post seems
to have vanished into oblivion. Apologies if it turns up.
I am having issues with re-uploading a previously REMOVED Asset.
I understand that in general you cannot mutate objects that have been set
to REMOVED.
I also noticed that when I ImageAsset with previously existing image data,
the API recognizes it returns the exact same Asset from the first upload.
Now, suppose have done the following:
1. Uploaded a new ImageAsset, and got back an AssetId.
2. Mutated that ImageAsset setting its AssetStatus to REMOVED.
And suppose I now wish to re-upload that image (say I removed it by
mistake).
The first thing I trued was to mutate the Asset and SET AssetStatus to
ENABLED, which naturally failed, although with an uninformative error
message: UNEXPECTED_INTERNAL_API_ERROR
Next, I tried to simply re-upload the image. The API accepted it, but
returned the AssetId of the previously uploaded file, with AssetStatus set
to REMOVED.
Finally I tried to upload the image with a new AssetName, and here is where
I got a funny error message, telling me to remove the existing asset before
I can rename it.
Google\AdsApi\AdWords\v201809\cm\ApiException [ 0 ]:
[AssetError{super=AssetError.CANNOT_MODIFY_ASSET_NAME @
operations[0].operand.assetName; trigger:'*There is an existing asset that
represents the same content as the asset to be added*, but with a different
name: the input asset has name '5cdeb8aeeaf5f'; and the existing asset has
name ''. *Remove the existing asset first if you would like to change the
name of the asset.*', reason=CANNOT_MODIFY_ASSET_NAME}]
Now, is setting the AssetStatus to REMOVED not enough to remove the Asset?
Am I missing something here?
Thanks for your help.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/65089e5d-4537-4588-a659-8e8b91f9a805%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.