Replace downcase with underscore when generating urls for links payload

- `rules?inputdevice_id=12` is now corrected to `rules?input_device_id=12`.
- `inputdevices/12/rule` is now corrected to `input_devices/12/rule`.