End points are the mechanism for executing your business logic and serving content to clients in response to a specified url path.
For example for url https://myapp.cloudgluesite.com/end/point/path the end point path is /end/point/path.
A typical site you will have a number of end points that perform one or related actions e.g. a signup end point that serves a Signup form on GET request, and attempts the signin on form submit (POST).
End points execute in a pipeline.
Map hostname to a site
Your site is mapped to the url https://sitesubdomain.cloudgluesite.com (support for custom domains coming Jan 2014).
The hostname is sitesubdomain.cloudgluesite.com. If a site with specified subdomain 'sitesubdomain' is located the pipeline continues otherwise the request is redirected to a generic error page.
Determine site verison
By default the active site version will be used. You can override this by referencing a specific version in the url path e.g.
Map request path to an end point
The pipeline executor tries to find an end point that matches the request path. Read about end point paths to understand what patterns are supported for paths.
If no matching end point is located, then find an end point with path /invalidpage, then /error. If no matches at this point a 401 error is returned.
Execute end point script
If the script is enabled (for performance reasons disable it if not being used), a bunch of context data is passed to the onRequest function in the script.
When a script completes it indicates outcome by calling a function on the passed request parameter.
Read about end point scripts for details.
Render page template
If a page template is specified it will be rendered if an enabled script hasn't indicated an error or redirect should occur.
Read about end point page rendering for details on what context data and helpers are available to page templates.
Scripts can also specify a return body via the response.body property
At this stage one of following outcomes occurred: