Update spark device function in api