Get data export consent state
This endpoint is only available to organization administrators.
GET https://xi.zulipchat.com/api/v1/export/realm/consents
Fetches which users have consented
for their private data to be exported by organization administrators.
Changes: Changes in Zulip 12.0 (feature level 430). Added an
integer field email_address_visibility to the objects in the
export_consents array.
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://xi.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, whether the
user has consented for their private data to be exported, and their
email visibility policy.
-
user_id: integer
The user ID.
-
consented: boolean
Whether the user has consented for their private data export.
-
email_address_visibility: integer
The policy for which other users
in this organization can see the user's real email address.
- 1 = Everyone
- 2 = Members only
- 3 = Administrators only
- 4 = Nobody
- 5 = Moderators only
Changes: New in Zulip 7.0 (feature level 163), replacing the
realm-level setting.
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,
"email_address_visibility": 1,
"user_id": 11
},
{
"consented": false,
"email_address_visibility": 2,
"user_id": 6
}
],
"msg": "",
"result": "success"
}