Home > REST Constraints > Interface/Uniform Contract

Interface/Uniform Contract

The Interface constraint states that all services and service consumers within a REST-compliant architecture must share a single, overarching technical interface. As the primary constraint that distinguishes REST from other architecture types, Interface is generally applied using the methods and media types provided by HTTP (Figure 1).

The technical contract established by Interface is typically free of business context because, in order to be reusable by a wide range of services and service consumers, it needs to provide generic, high-level capabilities that are abstract enough to accommodate a broad range of service interaction requirements.

Business-specific or service-specific data and meaning are isolated to the messages that are exchanged via the uniform technical contract.

Interface/Uniform Contract : The triangle symbol is used to represent the elements of a uniform contract: methods, media types, and resource identifier syntax.

Figure 1 - The triangle symbol is used to represent the elements of a uniform contract: methods, media types, and resource identifier syntax.

NOTE

On this Website, the Interface constraint is deliberately referred to as the Uniform Contract constraint to avoid confusion or watering down of the generic term "interface," and to further provide a clear contrast with the general concept of service contracts.