Sam api upgrade