887095 - fixing API breakage

This fixes my latest change in the API controller which broke all API calls when locale was not set. Resolves:

    private method `split' called for nil:NilClass

Please do not merge yet, still testing this.