O'Reilly logo

REST API Design Rulebook by Mark Masse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Media Type Representation

The application/wrml media type, introduced in Media Type Design, has two parameters: format and schema. These parameters have URI values that reference separate documents, each of which can enhance the semantics of the metadata attached to the Content-Type and Accept HTTP headers. This section’s rules describe the representations of these two document types.

Rule: A consistent form should be used to represent media type formats

Unlike traditional media types like application/json and application/xml, the application/wrml media type stipulates a format parameter with a URI value to address a document that describes the format of some content.

When formatted with JSON, a Format has the following media type:

# NOTE: the line breaks below are for the sake of visual clarity.

application/wrml;  1
    format="http://api.formats.wrml.org/application/json";  2
    schema="http://api.schemas.wrml.org/common/Format"  3
1

The WRML media type.

2

Identifies the format of the format document, which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required