Using the SOAP API, there doesn't seem to be a way to get the assetid of a cloned asset. The CloneAsset method returns only a string with "asset cloned" in it. This is kind of useless really.
What I'm wanting to do is to create linked assets. My analysis of the web services documentation lead me to try to firstly clone the asset, then I was going to try to create the linking between the two assets. How can I do this, if I can't get the assetid of the clone?
Is there a way to do what I'm trying to do? Am I going about this the wrong way?
SOAP API - get assetid of cloned asset
Please ignore this post - soon after writing it I realised the error of my ways. I should "create" the asset, not "clone" it. Then i can get the assetid.
Lesson learned: wine and code don't mix.
[quote]
Using the SOAP API, there doesn't seem to be a way to get the assetid of a cloned asset. The CloneAsset method returns only a string with "asset cloned" in it. This is kind of useless really.
What I'm wanting to do is to create linked assets. My analysis of the web services documentation lead me to try to firstly clone the asset, then I was going to try to create the linking between the two assets. How can I do this, if I can't get the assetid of the clone?
Is there a way to do what I'm trying to do? Am I going about this the wrong way?
[/quote]
I'd just like to chime in and say I'd be interested if anyone has any ideas - even if the OP isn't anymore
Unless I'm missing something, this appears to be a serious design flaw in the CloneAsset call.
Could someone put in a bug report/feature request to have it return the id of the new asset?
[quote]
Unless I'm missing something, this appears to be a serious design flaw in the CloneAsset call.
Could someone put in a bug report/feature request to have it return the id of the new asset?
[/quote]
AFAIK this is standard with the Clone Asset HIPO job which the CloneAsset call uses.
I'm not sure how hard it would be to return the assetid of the new asset, but you also have to consider that CloneAsset can make more than one asset.
A workaround (although ugly one) would be to do a getChildren on the parent asset before and after the clone and diff the results.
[quote]
I'm not sure how hard it would be to return the assetid of the new asset, but you also have to consider that CloneAsset can make more than one asset.
[/quote]
Right, I hadn't realised that. Could the return value be an array of asset ids?
[quote]
A workaround (although ugly one) would be to do a getChildren on the parent asset before and after the clone and diff the results.
[/quote]
Not only ugly, but it creates a race condition. A change to the API would seem to be the way to go.
[quote]
Right, I hadn't realised that. Could the return value be an array of asset ids?
Not only ugly, but it creates a race condition. A change to the API would seem to be the way to go.
[/quote]
It would be a good idea to return asset ids but the problem is not an API issue, the change would have to made to the HIPO job as well. And then it would to be incorporated into other areas as well. Just saying :lol: