Skip to content

Import CSV with admin APIs#617

Open
gsanchietti wants to merge 4 commits intomainfrom
import_csv
Open

Import CSV with admin APIs#617
gsanchietti wants to merge 4 commits intomainfrom
import_csv

Conversation

@gsanchietti
Copy link
Member

@gsanchietti gsanchietti commented Nov 26, 2025

Changes:

  • NethCTI Middleware now require MariaDB access
  • Generate NethCTI Middleware super admin API key (APIs are callable only from localhost)
  • Add ctictl to control the middleware

FIXME: before merge, change middleware version with actual version

Install:

add-module ghcr.io/nethesis/nethvoice:import_csv

Update:

api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:import_csv","instances":["nethvoice1"], "force": true}'

Usage example

Upload CSV:

ctictl /admin/phonebook/import -f contacts.csv -P username=giacomo

Reload profiles:

ctictl  /admin/reload/profiles --verbose

Fixes: NethServer/dev#7515

NethCTI Middleware administration enhancements:

  • Added documentation for a new CLI tool, ctictl, enabling administrators to list API endpoints, import CSV contacts, and trigger profile reloads, with improved credential management and verbose output options.

Service and environment configuration updates:

  • Updated the nethcti-middleware.service systemd unit to require and start after mariadb.service, and to load environment variables from passwords.env, improving service reliability and configuration.
  • Modified the container startup to mount the /etc/nethcti directory and pass additional MariaDB credentials as environment variables, ensuring proper database connectivity and configuration.

Super-admin credential management:

  • Added automatic generation of NETHVOICE_MIDDLEWARE_SUPER_ADMIN_TOKEN to the environment setup scripts, and ensured its persistence and update in passwords.env during both initial setup and subsequent updates. [1] [2] [3]

Build process update:

  • Changed the base image for the NethCTI Middleware container to use the user_profile tag, likely reflecting updated middleware features or requirements.

@gsanchietti gsanchietti self-assigned this Nov 26, 2025
@github-actions
Copy link

github-actions bot commented Nov 26, 2025

ℹ️ API content change detected:

No structural change, nothing to display.

Preview documentation

Powered by Bump.sh

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@gsanchietti gsanchietti changed the title Import csv Import CSV with admin APIs Nov 27, 2025
@gsanchietti gsanchietti marked this pull request as ready for review November 27, 2025 16:32
@gsanchietti gsanchietti assigned Amygos and unassigned gsanchietti and Amygos Nov 27, 2025
@gsanchietti gsanchietti requested review from Amygos and Stell0 November 27, 2025 16:34
#############################
reponame="nethvoice-cti-middleware"
container=$(buildah from ghcr.io/nethesis/nethcti-middleware:v0.4.3)
container=$(buildah from ghcr.io/nethesis/nethcti-middleware:user_profile)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove before deploy

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NethVoice: Enable import of editable CTI contacts via CSV from the NethVoice admin interface

3 participants