Retrieving date of last login of user X

Hi

I’ve looked through the parameters for the web API resource “Users”, but I cannot immediately see a way of retrieving the last logged in date for a specific user.

Is there a way of doing this, and if yes what is the syntax / parameter to use?

regards

Calle

···

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


https://play.dhis2.org/2.28/api/users.json?fields=userCredentials[id,name,username,lastLogin]

···

On 29 January 2018 at 12:02, Calle Hedberg calle.hedberg@gmail.com wrote:

Hi

I’ve looked through the parameters for the web API resource “Users”, but I cannot immediately see a way of retrieving the last logged in date for a specific user.

Is there a way of doing this, and if yes what is the syntax / parameter to use?

regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg



Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

For a specific user: https://play.dhis2.org/2.28/api/users/N3PZBUlN8vq.json?fields=id,name,userCredentials[id,name,username,lastLogin]

···

On 29 January 2018 at 12:40, Jan Henrik Øverland jan@dhis2.org wrote:

https://play.dhis2.org/2.28/api/users.json?fields=userCredentials[id,name,username,lastLogin]

On 29 January 2018 at 12:02, Calle Hedberg calle.hedberg@gmail.com wrote:

Hi

I’ve looked through the parameters for the web API resource “Users”, but I cannot immediately see a way of retrieving the last logged in date for a specific user.

Is there a way of doing this, and if yes what is the syntax / parameter to use?

regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg



Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

Lukas/David,

That works - thanks!

Regards

Calle

···

On 29 January 2018 at 13:14, David Palmer David.Palmer@mariestopes.org wrote:

Hi Calle,

Something like

/api/users?fields=userCredentials[username,lastLogin]&filter=userCredentials.username:eq:[YOUR_SPECIFIC_USER]

should do the trick

e.g.

https://play.dhis2.org/2.28/api/users?fields=userCredentials[username,lastLogin]&filter=userCredentials.username:eq:igor_m

Cheers,

Dave

Dave Palmer – Global Applications Manager MIS

T +44 (0) 20 3219 8098

M +44 (0) 7757 109777

skype dave-MSI

david.palmer@mariestopes.org.uk

www.mariestopes.org

Marie Stopes International

1 Conway Street

Fitzroy Square

London W1T 6LP

United Kingdom

From: Dhis2-devs [mailto:dhis2-devs-bounces+david.palmer=mariestopes.org.uk@lists.launchpad.net] On Behalf Of Calle Hedberg

Sent: 29 January 2018 11:02

To: dhis2-devs; Govender, Tanya

Subject: [Dhis2-devs] Retrieving date of last login of user X

Hi

I’ve looked through the parameters for the web API resource “Users”, but I cannot immediately see a way of retrieving the last logged in date for a specific user.

Is there a way of doing this, and if yes what is the syntax / parameter to use?

regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


This Email from Marie Stopes International and any attachments may contain information which is privileged or confidential. It is meant only for the individual(s) or entity named above. If you are not the intended recipient(s) of this Email or any part of it please notify the sender immediately on receipt and delete it from your system. Any opinion or other information in this email or its attachments that does not relate to the business of Marie Stopes International is personal to the sender and is not given or endorsed by Marie Stopes International.


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


Jan Henrik,

Thanks - seems you can either filter on a specific user using the UID or using the filter parameter. The latter will usually be a bit easier

Regards

calle

···

On 29 January 2018 at 13:42, Jan Henrik Øverland jan@dhis2.org wrote:

For a specific user: https://play.dhis2.org/2.28/api/users/N3PZBUlN8vq.json?fields=id,name,userCredentials[id,name,username,lastLogin]

On 29 January 2018 at 12:40, Jan Henrik Øverland jan@dhis2.org wrote:

https://play.dhis2.org/2.28/api/users.json?fields=userCredentials[id,name,username,lastLogin]


Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On 29 January 2018 at 12:02, Calle Hedberg calle.hedberg@gmail.com wrote:

Hi

I’ve looked through the parameters for the web API resource “Users”, but I cannot immediately see a way of retrieving the last logged in date for a specific user.

Is there a way of doing this, and if yes what is the syntax / parameter to use?

regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg



Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


Yes, that’s up to you.

···

On 29 January 2018 at 12:47, Calle Hedberg calle.hedberg@gmail.com wrote:

Jan Henrik,

Thanks - seems you can either filter on a specific user using the UID or using the filter parameter. The latter will usually be a bit easier

Regards

calle

On 29 January 2018 at 13:42, Jan Henrik Øverland jan@dhis2.org wrote:

For a specific user: https://play.dhis2.org/2.28/api/users/N3PZBUlN8vq.json?fields=id,name,userCredentials[id,name,username,lastLogin]


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


On 29 January 2018 at 12:40, Jan Henrik Øverland jan@dhis2.org wrote:

https://play.dhis2.org/2.28/api/users.json?fields=userCredentials[id,name,username,lastLogin]


Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On 29 January 2018 at 12:02, Calle Hedberg calle.hedberg@gmail.com wrote:

Hi

I’ve looked through the parameters for the web API resource “Users”, but I cannot immediately see a way of retrieving the last logged in date for a specific user.

Is there a way of doing this, and if yes what is the syntax / parameter to use?

regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg



Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org