After placing an order, my module calls an external API.

If success from external API, I need to update the order status.

I know how to update status in magento 1 but how do you do this in magento 2?

Thanks