AnsweredAssumed Answered

Move an element in AF using WebAPI

Question asked by wilson.laizo on Jul 17, 2017
Latest reply on Jul 19, 2017 by vkaufmann

Hello;

 

We are trying to use the WebAPI to move elements in an Asset Tree. As an example, the tree looks like this:

Parent 1

     Child 1

     Child 2

Parent 2

     Child 3

 

And we want it to be:

Parent 1

     Child 2

Parent 2

     Child 1

     Child 3

 

We have the methods AddReferencedElement and RemoveReferencedElement but using them we could add a reference making an asset appear twice, but we could not remove it from the original spot. After using the the three looks like:

Parent 1

     Child 1

     Child 2

Parent 2

     Child 1

     Child 3

 

If we go manually to System Explorer and remove the reference to the Parent 1, it will work as intended, but we could not make the RemoveReferencedElement to work. So the question is, are these commands the ones that we should be using or this is possible at all using the WebAPI?

Outcomes