Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 942 Bytes

templates.md

File metadata and controls

34 lines (29 loc) · 942 Bytes

Templates Collection

Support a templates collection to allow multiple template links to be returned in the same representation.[1]

  1. Add an optional top-level object: templates which contains a collection of link objects.
  2. Support optional type property (STRING) as a child of the link object. This property holds the IANA-registered media type (i.e. "application/x-www-form-urlencoded", etc.) of the target resource.
{ "collection" :
  {
    "version" : "1.0",
    "href" : "http://example.org/artifacts/",
    
    "templates" :
    [
      { 
        "rel": STRING,
        "href" : URI,
        "type" : STRING,
        "name" : STRING
      },
      { 
        "rel": STRING,
        "href" : URI,
        "type" : STRING,
        "name" : STRING
      }
    ]
  } 
}

References

  1. https://groups.google.com/forum/#!msg/collectionjson/bIZzvXQiXks/nVYS5rmkIkcJ