Hey,
I've spent couple of hours investigating why my content API returns null content response. I've finally managed to find the reson. It has turned out that my browser has set multiple languages and the first one was "en-US" so it is different then the one that is set in my cms, which is "en". My question is, if it is a bug? or there is some logic behind this?
In ContentApiController only first language is taken so I guess this is the reason, why the api couldn't load any content. I know that we can manually pass accept-language header but I'm not sure If an api response should depends on which language I have configured in my browser.
return this.ResultFromContent(this._contentLoaderService.Get(new ContentReference(contentReference), languages != null ? languages.FirstOrDefault<string>() : (string) null), expand);