update resource api