api: Fix an incorrect status code; 406 -> 415

"406 Not Acceptable" is not proper because it is for a request whose
Accept header is not acceptable. Use "415 Unsupported Media Type"
instead.

See <http://tools.ietf.org/html/rfc7231#section-6.5.6> for "406 Not
Acceptable" and <http://tools.ietf.org/html/rfc7231#section-6.5.13> for
"415 Unsupported Media Type".

(I am very sorry that I couldn't test it. I made this patch while I'm reading your code by just curiosity as a web programmer because @jonboulle told me you have web api. :smiley: Feel free to merge it or not)