updated ApiContext.Clone() and resources CloneWithApiContext()