Get presence of all users

GET https://thehowedepot.com/api/v1/realm/presence

Get the presence information of all the users in an organization.

See Zulip's developer documentation for details on the data model for presence in Zulip.

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Get presence information of all the users in an organization.
result = client.get_realm_presence()
print(result)

curl -sSX GET -G https://thehowedepot.com/api/v1/realm/presence \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

This endpoint does not accept any parameters.

Response

Return values

  • server_timestamp: number

    The time when the server fetched the presences data included in the response.

  • presences: object

    A dictionary where each entry describes the presence details of a user in the Zulip organization.

    • {user_email}: object

      Object containing the details of a user's presence on every client the user is logged into. The object's key is the user's email.

      • {client_name} or aggregated: object

        Object containing the details of the user's presence on a particular platform.

        Generally, the keys for these objects are the names of the different clients where this user is logged in, for example website or ZulipDesktop.

        There is also an aggregated key, which matches the contents of the object that has been updated most recently (except for the pushable value which is not present).

        • client: string

          The client's platform name.

        • status: string

          The status of the user on this client. Will be either idle or active.

        • timestamp: integer

          The UNIX timestamp of when this client sent the user's presence to the server with the precision of a second.

        • pushable: boolean

          Whether the client is capable of showing mobile/push notifications to the user.

          Not present in objects with the aggregated key.

Example response(s)

A typical successful JSON response may look like:

{
    "msg": "",
    "presences": {
        "iago@zulip.com": {
            "ZulipPython": {
                "client": "ZulipPython",
                "pushable": false,
                "status": "active",
                "timestamp": 1656958485
            },
            "aggregated": {
                "client": "ZulipPython",
                "status": "active",
                "timestamp": 1656958485
            }
        }
    },
    "result": "success",
    "server_timestamp": 1656958539.6287155
}