As the subject title suggests I need to archive all mail in one users INBOX preferably using a REST url like this:

But that only gets the inbox and not the subfolders. So far I've been able to get the inbox just fine, and I can get other folders if I using a string like:

Which gets the inbox and subfolders, but not everything, I don't really know why but it seems to skip over emails that come from our automated server responses or notification emails.

Any help would be appreciated.