update instance api