Endpoints are the main building blocks of TypedRest. An endpoint represents an URI that provides methods for interacting with a specific resource. The type of the endpoint determines the available methods.

TypedRest provides a number of endpoint types modelling common REST patterns. Most APIs can be consumed by either directly using these types or by deriving from them and adding a few additional methods for special use cases.

Entry endpoints represent the top-level URI of APIs.

Generic endpoints allow you to model collections and elements:

  • Element - individual resource (read, write, delete)
  • Collection - collection of entities addressable as elements (read all, create, get child by ID)
  • Indexer - address child endpoints by ID

Raw endpoints allow you to transmit binary data rather than serialized objects:

  • Upload - accept binary uploads
  • Blob - download or upload a binary blob

Reactive endpoints allow you to receive data as push streams rather than explicitly pulling:

RPC endpoints allow you to interact with non-RESTful resources that act like callable functions:

  • Action - no input or output
  • Consumer - takes entity as input
  • Producer - produces entity as output
  • Function - takes entity as input and produces entity as output