()
Returns data sources based on datasetId and groupId
Returns data sources based on datasetId and groupId
Returns data sources based on datasetId and groupId
def get_datasources_in_group():
    ''' Returns data sources based on datasetId and groupId '''

    group_id = request.args.get('groupId')
    dataset_id = request.args.get('datasetId')

    try:
        access_token = AadService.get_access_token()

        data_source_service = GetDatasourceService()
        api_response = data_source_service.get_datasources_in_group(access_token, group_id, dataset_id)

        if api_response.ok:
            return Response(api_response, api_response.status_code)
        else:
            if not api_response.text:
                return json.dumps({'errorMsg': str(f'Error {api_response.status_code} {api_response.reason}\nRequest Id:\t{api_response.headers.get("RequestId")}')}), api_response.status_code
            else:
                return json.dumps({'errorMsg': str(f'Error {api_response.status_code} {api_response.reason}\n{api_response.text}\nRequest Id:\t{api_response.headers.get("RequestId")}')}), api_response.status_code

    except Exception as ex:
        return json.dumps({'errorMsg': str(ex)}), 500
def get_datasources_in_group ( ) : group_id = request . args . get ( 'groupId' ) dataset_id = request . args . get ( 'datasetId' ) try : access_token = AadService . get_access_token ( ) data_source_service = GetDatasourceService ( ) api_response = data_source_service . get_datasources_in_group ( access_token , group_id , dataset_id ) if api_response . ok : return Response ( api_response , api_response . status_code ) else : if not api_response . text : return json . dumps ( { 'errorMsg' : str ( f'Error {api_response.status_code} {api_response.reason}\nRequest Id:\t{api_response.headers.get("RequestId")}' ) } ) , api_response . status_code else : return json . dumps ( { 'errorMsg' : str ( f'Error {api_response.status_code} {api_response.reason}\n{api_response.text}\nRequest Id:\t{api_response.headers.get("RequestId")}' ) } ) , api_response . status_code except Exception as ex : return json . dumps ( { 'errorMsg' : str ( ex ) } ) , 500