I had this code working and now I am getting a 404 not found error.
I see this in the message:
bundle=serverclass stanza=serverClass:Test The sourceApp=system doesn't equal callerApp=search
services/deployment/server/serverclasses/server-class
args: whitelist.0= host1
Thanks!
Try using the edit REST endpoint for server class.
Replace
/services/deployment/server/serverclasses/server-class
with
/servicesNS/nobody/system/deployment/server/serverclasses/server-class
See if it works for you.