Content type of links


Are there any recommended strategies for specifying the content type of links? E.g. suppose that in addition to the JSON representation of the resource pointed to by links.self, there are HTML and PDF versions of the resource.

In general you’d want your JSON, HTML and PDF to all reside at the same location (self link), and for the requested Content-Type to be discriminating factor, but

  • a) how do you document that the alternative formats are available if you only include a single self, and
  • b) what if the other representations don’t actually reside at the same address?
  "id": 1,
  "links": {
    "self": "",
    "pdf": "",

^ Is all I can think of.