Media Types | Agents || Home | About | Content Negotiation by Profile

Alternate Representations

See this content according to other profiles/views and Media Type/formats:

Alternates View

Media Types Web Service

This service serves the Media Types Dataset.

Description

This web service, a Linked Data API, delivers IANA's Media Types in forms useful for Linked Data applications.

It's also a demonstration implementation of the W3C's Content Negotiation by Profile specification. See the dedicated Conneg-by-P page for how this system implements the required functions.

Media Types (used to be called MIME types, sometimes called formats, also see Wikipedia) are listed by IANA at https://www.iana.org/assignments/media-types/media-types.xml and we just take that data, convert it to RDF, store it, and serve it up using a small Python Linked Data API imaginatively called pyLDAPI.

Identifiers

The identifier for this web service as a whole is just it's web address: https://conneg.info/mediatypes-service but, more importantly, the individual items delivered by this web service have identifiers.

W3ID provides a "secure, permanent URL re-direction service for Web applications.

By using W3ID-based identifiers for each Media Type, this Register provides a stable way to refer to each Media Types by URI.

This is not new or groundbreaking stuff but previous attempts to make this information available via URI seem to be offline (e.g. see http://purl.org/NET/mediatypes/).

Dates

Created
2019-04-03
Modified
2019-10-23
Issued
2019-04-13

Types & Identifiers

This is a Service type of thing that is publicly accessible.

This system conforms to functional profiles of the Content Negotiation by Profile specification, specifically:

You should identify this service using the identifier https://conneg.info/mediatypes-service.

The endpoint of this service is at its URI identifier location: https://conneg.info/mediatypes-service.

License & Rights

The content of this API is licensed for use under the Creative Commons 4.0, © Nicholas J Car, 2019.

You are permitted to reproduce & distribute and, if you do, you must attribute & share alike.

Contacts

If you want to know more, contact:

Nicholas Car
Data Systems Architect & W3C Working Group member
SURROUND Australia Pty Ltd
Brisbane, Queensland, Australia
nicholas.car@surroundaustralia.com
ORCID: 0000-0002-8742-7730

Languages

All of the content delivered by this service is available in English and some of it is also available in Polish.

Keywords & Themes

This service is tagged and classified as follows:

Code

The code for this application is online at https://github.com/nicholascar/mediatypes-service.

Usage Note - RDF & Linked Data

The initial reason for creating this web service was to allow for standardised human- and machine-readable forms of the IANA Media Types information to be accessible (dereferencable) via stable URIs, as per Linked Data expectations.

For every Media Type type in IANA's list, this W3ID makes a URI like this:

  • https://w3id.org/mediatype/ + {Media-Type}

So for text/html we have:

  • https://w3id.org/mediatype/text/html

It's not rocket surgery...

Clicking on that URI yields a simple web page (HTML) view of the Media Type's properties, however you can also get machine-readable forms of the Media Type's information, formulated using RDF, in a number of ways. This system implements the Content Negotiation by Profile specification which means you can request not only different formats of information but also information according to different profiles. For example:

  • Add a _mediatype or a _format query string argument to the URI with a Media Type value to specify a chosen format. To get RDF in the Turtle format for the Media Type image/jpg, use this URI:
  • Use HTTP Content Negotiation and set an Accept header to the format you want. For image/jpg information in the text/turtle format, as above, do this, using the CURL command line tool:
    • $ curl --headers 'Accept: text/turtle' https://w3id.org/mediatype/image/jpg

Profiles & Dublin Core metadata

The machine-readable RDF for this service's content is conformant with the Dublin Core Terms vocabulary (DCT) so we've profiled DCT to allows us to describe what properties from it are needed to characterise a Media Type. Our 'mediatypes' profile is defined here: https://w3id.org/profile/mediatype and you can request machine-readable Media Type information from this system specifically by doing either of the following two things:

There are also other profiles or views available for each meaditype, e.g. the "view that lists all other views" which you can access via URI + ?_view=alternates

See this system's Content Negotiation by Profile implementation page.

Downloads

You can download the entire content that this service delivers as a single file: