Get data export consent state

This endpoint is only available to organization administrators.

GET https://theoretical-exercises.zulipchat.com/api/v1/export/realm/consents

Fetches which users have consented for their private data to be exported by organization administrators.

Changes: New in Zulip 10.0 (feature level 295).

Usage examples

#!/usr/bin/env python

import zulip

# The user for this zuliprc file must be an organization administrator
client = zulip.Client(config_file="~/zuliprc-admin")

# Get the consents of users for their private data exports.
result = client.call_endpoint(url="/export/realm/consents", method="GET")
print(result)

curl -sSX GET -G https://theoretical-exercises.zulipchat.com/api/v1/export/realm/consents \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

This endpoint does not accept any parameters.

Response

Return values

  • export_consents: (object)[]

    An array of objects where each object contains a user ID and whether the user has consented for their private data to be exported.

    • user_id: integer

      The user ID.

    • consented: boolean

      Whether the user has consented for their private data export.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "export_consents": [
        {
            "consented": true,
            "user_id": 11
        },
        {
            "consented": false,
            "user_id": 6
        }
    ],
    "msg": "",
    "result": "success"
}