How to move an index from a list with maapi_move or another function

Hello,

I’m looking to move an index from a list to a different position like
move my index 4 to index 8 by exemple or
a list of index list 1,2,3,4 to 9,10,11,12 or
reverse index 4 to index 9 by exemple.

I have seen the exemple in confd user guide but is not really complete, I would like if possible additional information.

Thank you in advance.

Something like this should move 4 to 8.

confd_value_t vl_new_key[1];
CONFD_SET_UINT32(&vl_new_key[0], 8);
maapi_move(maapi_socket, th, vl_new_key, 1,"/list_path{%u}", 4);