Looks like doesNotHaveTag wants a tagId, not a tag name. Try:
where=(where(doesNotHaveTag EPOLeafNode.appliedTags 1))
where you get the id (1) from doing a:
tagNotes: Default tag for systems identified as a Server
Thanks. What about system.applyTag? It seems to use the tag name not tag ID ?
Yes, it does ... when you're in the guts of a query s-expression you're inside code that was previously only internal, and it mostly uses ids ... for new commands that we explicitly added we tried to make it more friendly by using tag names, but depending on what level you're working at both can show through the API.
The core.executeQuery command is probably worth a whole preso/api doc in and of itself -- it's pretty powerful.