Sets defaults on api routes