As far as I can tell, ordapi only supports getting inscriptions by their ID, not by their number. You can check this on getInscriptionContent, getInscriptionRecursive, etc.
edit: nevermind -- it does work if you do e.g. getInscriptionContent(2.toString()). To be determined if this is the desired behavior?