snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.93k stars 3.16k forks source link

[Feature Request]: Trigger LDAP Sync via API #15615

Open ntbutler-nbcs opened 3 days ago

ntbutler-nbcs commented 3 days ago

Is your feature request related to a problem? Please describe.

I'm not sure if this has been discussed already, but it would be great if the LDAP sync could be triggered via an API call or similar. In particular I am trying to figure out how to schedule the LDAP sync to run regularly, but I have just moved our instance into a Docker container and I wasn't sure how to achieve this when using a dockerized instance.

Describe the solution you'd like

A new API endpoint, possibly in the "settings" group: /settings/ldap/sync It could be a POST request that takes optional location/locationId fields:

{
    "locationId": 4
}

Describe alternatives you've considered

No response

Additional context

No response

ntbutler-nbcs commented 3 days ago

Having literally just created this feature request, it just clicked in my head that I can achieve this in my instance with a cron job running a docker exec -t snipeit /usr/bin/php /var/www/html/artisan snipeit:ldap-sync command, so I guess that would be the alternative in this instance. But I still think being able to trigger this via the API would be a useful addition 😄