before making any changes, make sure you take a good backup of the "/usr/share/zabbix" directory (where the web/php/api files reside).
tar cvfz ~/zabbix_www_backup.20151114.tar.gz /usr/share/zabbix
next, download the zbxNext1193-2.2.8.patch, copy it to the /usr/share/zabbix directory, and apply the patch as follows:
"patch -p0 < zbxNext1193-2.2.8.patch"
This should make the necessary modifications to your files, and exposed a new Trend API.
Notes: 1- the patch mentioned above is for 2.2.8. Might work for 2.2.7 as is, hence the backup procedure.
2- you probably need to use "sudo" with the above commands, since the default package installation have the files belonging to root:root.
I've set up a quick, 2.2.10 environment to test the above (can't download 2.2.7 anymore), but hopefully this should work.