Skip to content

Sharing Groups

add_org_to_sharing_group async

add_org_to_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
    body: AddOrgToSharingGroupBody,
) -> SharingGroupOrgSchema

Add an organisation to a sharing group.

Input:

  • auth: Authentication details

  • db: Database session.

  • id: ID of the sharing group to add the organisation

  • body: Request body containing organisation details

Output:

  • SharingGroupOrgSchema: Representation of the added organisation in the sharing group

add_org_to_sharing_group_legacy async

add_org_to_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
    organisation_id: Annotated[
        int, Path(alias=organisationId)
    ],
    body: AddOrgToSharingGroupLegacyBody = AddOrgToSharingGroupLegacyBody(),
) -> StandardStatusResponse

Add an organisation to a sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to add the organisation

  • organisation_id: ID of the organisation to add

  • body: Request body containing additional details

Output:

  • StandardStatusResponse: Response indicating success or failure

add_server_to_sharing_group async

add_server_to_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
    body: AddServerToSharingGroupBody,
) -> dict

Add a server to a sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to add the server

  • body: Request body containing server details

Output:

  • Representation of the added server in the sharing group

add_server_to_sharing_group_legacy async

add_server_to_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
    server_id: Annotated[int, Path(alias=serverId)],
    body: AddServerToSharingGroupLegacyBody = AddServerToSharingGroupLegacyBody(),
) -> StandardStatusResponse

Add a server to a sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to add the server

  • server_id: ID of the server to add

  • body: Request body containing additional details

Output:

  • StandardStatusResponse: Response indicating success or failure

create_sharing_group async

create_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: CreateSharingGroupBody,
) -> dict

Add a new sharing group with given details.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Request body containing details for creating the sharing group

Output:

  • Details of the created sharing group

create_sharing_group_legacy async

create_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: CreateSharingGroupLegacyBody,
) -> dict

Add a new sharing group with given details.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Request body containing details for creating the sharing group

Output:

  • Representation of the created sharing group

delete_sharing_group async

delete_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
) -> dict

Delete a specific sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to delete

Output:

  • Representation of the deleted sharing group

delete_sharing_group_legacy async

delete_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
) -> dict

Delete a specific sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to delete

Output:

  • Representation of the deleted sharing group

get_all_sharing_groups async

get_all_sharing_groups(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
) -> dict

Retrieve a list of all sharing groups.

Input:

  • auth: Authentication details

  • db: Database session

Output:

  • Representation of all sharing groups

get_sharing_group async

get_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
) -> dict

Retrieve details of a specific sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to retrieve

Output:

  • Representation of the sharing group details

get_sharing_group_info async

get_sharing_group_info(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
) -> dict

Details of a sharing group and org.count, user_count and created_by_email.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to retrieve additional information

Output:

  • Representation of the sharing group information

remove_org_from_sharing_group async

remove_org_from_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
    organisation_id: Annotated[
        int, Path(alias=organisationId)
    ],
) -> dict

Remove an organisation from a sharing group

Input:

  • auth: Authentication details

  • db: Database session.

  • id: ID of the sharing group to remove the organisation

  • organisation_id: ID of the organisation to remove

Output:

  • Representation of the removed organisation from the sharing group

remove_org_from_sharing_group_legacy async

remove_org_from_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
    organisation_id: Annotated[
        int, Path(alias=organisationId)
    ],
) -> StandardStatusResponse

Remove an organisation from a sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to remove the organisation from

  • organisation_id: ID of the organisation to remove

Output:

  • StandardStatusResponse: Response indicating success or failure

remove_server_from_sharing_group async

remove_server_from_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
    server_id: Annotated[int, Path(alias=serverId)],
) -> dict

Remove a server from a sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to remove the server

  • server_id: ID of the server to remove

Output:

  • Representation of the removed server from the sharing group

remove_server_from_sharing_group_legacy async

remove_server_from_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
    server_id: Annotated[int, Path(alias=serverId)],
) -> StandardStatusResponse

Remove a server from a sharing group.

Input:

  • auth: Authenticated user with 'SHARING_GROUP' permission

  • db: Database session

  • id: ID of the sharing group to remove the server from

  • server_id: ID of the server to remove

Output:

  • StandardStatusResponse: Response indicating success or failure

update_sharing_group async

update_sharing_group(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: int,
    body: UpdateSharingGroupBody,
) -> dict

Update an existing sharing group.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to update

  • body: Request body containing updated details for the sharing group

Output:

  • Representation of the updated sharing group

update_sharing_group_legacy async

update_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
    body: UpdateSharingGroupLegacyBody,
) -> ViewUpdateSharingGroupLegacyResponse

Update an existing sharing group by its ID.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to update

  • body: Request body containing updated details for the sharing group

Output:

  • ViewUpdateSharingGroupLegacyResponse: Representation of the updated sharing group.

view_sharing_group_legacy async

view_sharing_group_legacy(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID,
                [Permission.SHARING_GROUP],
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    id: Annotated[int, Path(alias=sharingGroupId)],
) -> dict

Retrieve details of a specific sharing group by its ID.

Input:

  • auth: Authentication details

  • db: Database session

  • id: ID of the sharing group to retrieve

Output:

  • Representation of the sharing group details