There is another way as well:
curl -X PUT "me.local:32400/library/sections/NN/all?type=1&collection.locked=0&X-Plex-Token=XXXXX"
me.local
replace by the local IP or the FQDN of your server
NN
replace by the number of the library
XXXXX
replace with your Plex Token
More like that: New Music Metadata handling