Has anyone used SWQL or SQL to update a Bearer Token value for an API Poller?

We have a token that we renew on a regular basis.  When we have monthly patching and reboots of systems, the token is expiring during this process.  I created a .bat file that can generate a new token and I can parse it out to get the new token.  I would like to store it in the existing Bearer Token, or create a new one and update the token being used by the 5 other API Pollers that are using the same Bearer Token.  Any ideas on how to update this information with a script?

Parents Reply
  • Orion.Credential UpdateCredentials (int id, Dictionary<string, string> properties)

    The SWIS verb. I cannot get the second paramater of the function to pass correctly without it throwing an error. I looked at Credential Management · solarwinds/OrionSDK Wiki · GitHub, for what keys it requires. When i formatted it like this as an xml doc first, it threw some sort of error for  not having an "add" function which made me think it indeed does want it as a dictionary. But everytime i tried pass a dictionary it told me it was the incorrect format.
    How am i supposed to pass the xml string in a dictionary format?

    If you got it working, can you show me an example format?

Children