Update api.rst with device field