Missing "presenceStatus" from Rest API plugin (.../v1/sessions)


I am on Openfire 3.10.3 and using REST Api plugin (1.1.6).

I want to list all available sessions with call …http://example.org:9090/plugins/restapi/v1/sessions

It works fine, except one thing, it is not returning “presenceStatus” in Json response, even in documentation this field is not marked as optional.

The same situation is with “node” response parameter. All other fields are returned, even “resource” which is optional.

Is there something which is affecting if “presenceStatus” is available in the response ? (some configuration, environment setup).

Or is just documentation wrong and it is not implemented at all ?


I tried it with 3.10.3 and REST API 1.1.7 and could partly reproduce your issue.

I can get a valid presenceStatus but the node value is indeed broken (I will fix it in the near future).

hmmm, I also tried 3.10.3 and Rest API plugin 1.1.7 in one of our environments but still not getting presenceStatus. We have several Amazon servers running Ubuntu and it’s not working on any of them.

I’ll try to do the complete fresh install on my local machine with 3.10.3 and check the status. On our Amazon servers we have been only upgrading from 3.9.3, through 3.10.1 and 3.10.2 to the final 3.10.3 version (I think), so I just want to eliminate some upgrade issue by fresh install.

So, I did some more testing and I think now I understand what is going on.

“presenceStatus” is available in the response only when user/client set some custom message for the status.

So if presence status is e.g. set to “Away” on client, but no additional text is set (e.g. “I am watching TV”), then no “presenceStatus” is available in the response.

If also additional message is set, then that one is returned in “presenceStatus”.

I was expecting to see the same value in “presenceStatus” as is displayed in Openfire Admin console -> Sessions -> Client sessions table in Presence column. (at least all other columns match the plugin response)

Unfortunately it seems the plugin is returning only custom presence message, so if we do not update our mobile clients to set also message text I will be no able to retrieve their presence from the plugin (only sessionStatus)

The value from Presence column is exactly what I need.

So there is no field in the Rest Api response representing “presence mode” (online, away, do not disturb, extended away, available for chat), right ???

1 Like

Yes, you are right, and I will add the “presence mode” to the plugin, because you are right, it is also important parameter.

1 Like

Thanks, that would be great

1 Like

This change is very important! Thanks!!! I will hope… Best Regards!

The Plugin REST API version 1.2.2 contains that.

You have Presence Status (away) and Presence Message e.g. ('brb for few min ') in the response.