esacli generateToken

Use the esacli generateToken command to generate token for the IBM® Electronic Service Agent.

Synopsis

esacli generateToken {[-i ]} (client ID)

Description

The esacli generateToken command enables you to generate an access token. This token is used to authenticate to ESA and update the settings of ESA, once ESA is activated.

Options

-i | --id
Generates token for the specified client ID, even if token already exists.

Exit status

The following table contains the codes that are returned by this command.
  • 0: The operation completed successfully.
  • 1: IBM Electronic Service Agent instance is not running.
  • 5: An unsupported command was specified.
  • 10: Unsupported option was specified. Option: {option}.
  • 14: A required option was not provided. Option: {option}.
  • 18: An option was set more than once. Option: {option}.

Examples

This example illustrates running the esacli generateToken command.
esacli generateToken -i PrimarySystem
{"expiry-interval":"1440","access-key":"54cf6fe79583bd38dca762be29683b3d","token-id":"57d061f0f6002dcb98c4a6f537a46dd8","expiry-in":"1440","created-date":"1701421805708"}
./esacli generateToken -i 11.11.11.11
esacli generateToken -i 11.11.11.11
Cannot generate token. System is not yet registered.