added JSON API preconditions