title: What is the "endpoint" in flask's .add_url_rule()?
body: <p>Consider the following code</p>
  
  <pre><code>import flask
  
  class API:
      def hello(self):
          return flask.Response('hello', 200)
  
  api = API()
  app = flask.Flask(__name__)
  app.add_url_rule('/', 'hello', api.hello)
  app.run()
  </code></pre>
  
  <p>It returns "hello" upon a <code>GET</code> call to <code>/</code>.</p>
  
  <p>The <a href="http://flask.pocoo.org/docs/0.10/api/#flask.Flask.add_url_rule" rel="noreferrer">documentation for <code>add_url_rule</code></a> states that </p>
  
  <blockquote>
    <p>[<code>add_url_rule</code>] works exactly like the <code>route()</code> decorator.</p>
  </blockquote>
  
  <p>It requires however at least three parameters. The first and third one are understandable and mimic <code>@route()</code>. What is the second one (<code>hello</code> in my case)?</p>
  
  <p>The documentation further states that this is </p>
  
  <blockquote>
    <p><strong>endpoint</strong> – the endpoint for the registered URL rule. Flask itself assumes the name of the view function as endpoint</p>
  </blockquote>
  
  <p>What does this mean? Why isn't the URL (<code>/</code>) and the method to call (<code>api.hello</code>) sufficient? What is the role of the "endpoint"? How is it exactly used?</p>