How to reload a requisition using curl

how-to
requisitions
faq
provisioning

#1

How can I reload an existing requisition like below using a curl command?

  <requisition-def import-name="Servers" import-url-resource="http://IP-ADDRESS:8000/requisitions/Servers">
    <cron-schedule>0 0 * * * ? *</cron-schedule>
  </requisition-def>

#2

You can send the reloadImport event with the following parameter:

curl -u admin:pass -X POST \
     -d "<event><uei>uei.opennms.org/internal/importer/reloadImport</uei><parms><parm><parmName>url</parmName><value>http://IP-ADDRESS:8000/requisitions/Servers</value></parm></parms></event>" \
     -H "Content-Type: application/xml" http://my-opennms:8980/opennms/rest/events