Added patterns endpoints.