Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to retrieve the last login information of the user(s) using Confluence Command Line Interface a user or user group using Confluence Command Line Interface (CLI).

Instructions

Use  the getUser action  action to display the user statistics in general, using CLI action. 

To

...

retrieve the last login information for single user:

Execute the below action to display the specific usera specific user's latest login details using details using the name parameter:

Code Block
themeMidnight
--action getUser --name admin

The login information of the a given user is displayed as highlighted in the screenshot below screenshot:
Image Modified

Execute the below action to display a specific user details using userId parameter parameter:

Code Block
themeMidnight
--action getUser --userID admin2

To

...

retrieve the last login information

...

of the current user who is executing the CLI action:

Execute the below action to display the logged in user's latest s latest login details:

Code Block
themeMidnight
--action getUser

...

To retrieve the login information of the users of a specific group:

  1. Execute the below action using getUserList to display the latest the latest login information of all the users belonging to the "confluence-users" group:

    Code Block
    themeMidnight
    --action getUserList --group "confluence-users" --file list.csv


  2. Modify the column column User in the CSV file obtained from the above previous step to to userId and save the file (list.csv).
  3. Run the below given CLI action using runFromCsv against the file modified in the step# 2step #2.

    Code Block
    themeMidnight
    --action runFromCsv --file list.csv --common "-a getUser"


To

...

retrieve the latest login information of all users:

Execute the below action to display the latest the latest login information of all the users with the runFromUserList action action:

Code Block
themeMidnight
--action runFromUserList --name "@all" --common "-a getUser --userId @userId@"


The parameters used in the above actions are:

  • --nameThe value defines the name of the user.
  • --userId: The value defines the user Id of the user.
  • --group: The value value defines the group group name.
  • --file: The value value defines the contents to the file path