magpie.api.management.group.group_formats ========================================= .. py:module:: magpie.api.management.group.group_formats Functions --------- .. autoapisummary:: magpie.api.management.group.group_formats.format_group Module Contents --------------- .. py:function:: format_group(group: magpie.models.Group, basic_info: bool = False, public_info: bool = False, dotted: bool = False, db_session: Optional[sqlalchemy.orm.session.Session] = None) -> magpie.typedefs.JSON Obtains the JSON formatted :term:`Group` definition according to field selection flags. :param group: Group for which to provide details. :param basic_info: If ``True``, return only sufficient details to identify the group (useful for routes that refer to a group, but that are not requesting it specifically), or return full details (for routes that specifically request its information, e.g.: ``GET /groups/{grp}``). :param public_info: Indicate if the returned details are intended for public information (``True``) or admin-only (``False``). Only higher level users should be provided additional details to avoid leaking potentially sensitive parameters. :param dotted: Employ a dot (``.``) instead of underscore (``_``) to separate :term:`Group` from its basic information. :param db_session: Database connection to retrieve additional details (required when ``public_info=False``).