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
  • The newer versions (starting in 2022.4) of the platform include some new credential management.

    Entity: Orion.Credential

    Verbs:

    CreateCredentials Creates credential with provided list of properties
    CreateSNMPCredentials Creates SNMP v1 or v2c credentials
    CreateSNMPv3Credentials Creates SNMP v3 credentials
    CreateUsernamePasswordCredentials Creates credentials with username and password, these are used for example by WMI polling.
    CreateUsernamePasswordWithContentCredentials Creates credentials with username, password and content, these are used for example by PaloAlto REST polling.
    UpdateCredentials Updates credential properties
    UpdateSNMPCredentials Updates SNMP v1 or v2c credentials.
    UpdateSNMPv3Credentials Updates SNMPv3 credentials.
    UpdateUsernamePasswordCredentials Updates credentials with username and password. These are used, for example, by WMI polling.
    UpdateUsernamePasswordWithContentCredentials Updates credentials with username, password and content. These are used for example by PaloAlto REST polling.

    You could look in the credential entity for the API Poller creds you are trying to update and then use the UpdateCredentials verb.

Reply
  • The newer versions (starting in 2022.4) of the platform include some new credential management.

    Entity: Orion.Credential

    Verbs:

    CreateCredentials Creates credential with provided list of properties
    CreateSNMPCredentials Creates SNMP v1 or v2c credentials
    CreateSNMPv3Credentials Creates SNMP v3 credentials
    CreateUsernamePasswordCredentials Creates credentials with username and password, these are used for example by WMI polling.
    CreateUsernamePasswordWithContentCredentials Creates credentials with username, password and content, these are used for example by PaloAlto REST polling.
    UpdateCredentials Updates credential properties
    UpdateSNMPCredentials Updates SNMP v1 or v2c credentials.
    UpdateSNMPv3Credentials Updates SNMPv3 credentials.
    UpdateUsernamePasswordCredentials Updates credentials with username and password. These are used, for example, by WMI polling.
    UpdateUsernamePasswordWithContentCredentials Updates credentials with username, password and content. These are used for example by PaloAlto REST polling.

    You could look in the credential entity for the API Poller creds you are trying to update and then use the UpdateCredentials verb.

Children