.. SPDX-FileCopyrightText: 2021-2023 Univention GmbH
..
.. SPDX-License-Identifier: AGPL-3.0-only

.. _self-disclosure-api:

*******************
Self-Disclosure API
*******************


If your service needs information for or about the requesting user, you can fetch user data like school roles and class memberships by calling the :term:`Self-disclosure API`.
This is illustrated in step 8 (*students details*) of :ref:`auth-and-dr`.

The user, who logs in with their browser, sends an ``auth_token``. It enables the API to fetch the requested data.
The student or teacher in return receive this ``auth_token`` from the ID Broker.

The :term:`Swagger User Interface (Swagger UI)` is accessible at

- Staging environment: https://self-disclosure.staging.univention-id-broker.com/ucsschool/apis/docs
- Production environment: https://self-disclosure.production.univention-id-broker.com/ucsschool/apis/docs

The IP of your service will be added to the allow-list (whitelist) and you will be able to call the API from your application after you have registered it as described in :ref:`on-boarding-process`.

For more information about the API, see the :ref:`ID Broker manual for the Self-disclosure API
<id-broker-self-disclosure-api:introduction>`.
