public async Task DeleteProfiles()
        {
            var profiles = await GetProfiles();

            var url = $"{ Configuration["AudioAnalyticsAPI"] }identificationProfiles/";

            var key = Configuration["AudioAnalyticsKey"];

            foreach (var profile in profiles)
            {
                var profileUrl = url + profile.Id;
                await CognitiveServicesHttpClient.HttpDelete(profileUrl, key);
            }
        }
Ejemplo n.º 2
0
        public async Task DeleteProfiles()
        {
            var profiles = await GetPersons();

            var groupId = Configuration["PersonGroupId"];

            var url = Configuration["CognitiveFacesUri"] + $"/persongroups/{groupId}/persons/";

            var key = Configuration["CognitiveFacesKey"];

            foreach (var profile in profiles)
            {
                var deleteUrl = url + profile.PersonId;

                await CognitiveServicesHttpClient.HttpDelete(deleteUrl, key);
            }
        }
        public async Task DeleteProfiles()
        {
            var url = $"{Configuration["AudioAnalyticsAPI"]}verificationProfiles/";

            var key = Configuration["AudioAnalyticsKey"];

            var response = await CognitiveServicesHttpClient.HttpGet(url, key);

            var responseBytes = await response.Content.ReadAsStringAsync();

            if (response.IsSuccessStatusCode)
            {
                var enrollments = JSONHelper.FromJson <EnrollmentStatus[]>(responseBytes);

                foreach (var enrollment in enrollments)
                {
                    var profileUrl = url + enrollment.VerificationProfileId;

                    var r = await CognitiveServicesHttpClient.HttpDelete(profileUrl, key);
                }
            }
        }