Add --debug flag to *-endpoints[s]

When debugging API scripts, --debug is invaluable.

Change-Id: Ica92484e9001bdff4b6daa8d392d5d8d0478db82