Add data property to patterns

This adds a data property to endpoint patterns. It also alters the promise callback to return the endpoint, which contains the data, instead of only the data.