Link (JSON)
A hypermedia link, used to drive the state of a hypermedia-enabled genealogical data application.
Properties
Name |
Type |
Description |
|
href |
string
|
The target IRI of the link. |
|
template |
string
|
A URI template per RFC 6570, used to link to a range of
URIs, such as for the purpose of linking to a query. A link specifying a template can be formally referred to
as a "Templated Link (LT)" per Amundsen, M. (2011). Hypermedia APIs with HTML5 and Node. O'Reilly. |
|
title |
string
|
Human-readable information about the link. |
|
type |
string
|
Metadata about the available media type(s) of the resource being linked to. The value of the "type" attribute is
as defined by the HTTP specification, RFC 2616, Section 3.7.
Note that this attribute can be considered an "Update Control (CU)" per Amundsen, M. (2011). Hypermedia APIs with HTML5 and Node. O'Reilly. |
|
accept |
string
|
Metadata about the acceptable media type(s) that can be used to update (i.e. change the state of) the resource being linked to. The value of
the "accept" attribute is as defined by the HTTP specification, RFC 2616, Section 3.7.
Note that this attribute can be considered an "Read Control (CR)" per Amundsen, M. (2011). Hypermedia APIs with HTML5 and Node. O'Reilly. |
|
allow |
string
|
Metadata about the allowable methods that can be used to transition to the resource being linked. The value of
the "allow" attribute is as defined by the HTTP specification, RFC 2616, Section 14.7.
Note that this attribute can be considered an "Method Control (CM)" per Amundsen, M. (2011). Hypermedia APIs with HTML5 and Node. O'Reilly. |
|
hreflang |
string
|
The language of the resource being linked to.
Note that this attribute can be considered an "Update Control (CU)" per Amundsen, M. (2011). Hypermedia APIs with HTML5 and Node. O'Reilly. |
|
count |
number
|
The number of elements in the page, if this link refers to a page of resources. |
|
offset |
number
|
The index of the offset of the page, if this link refers to a page of resources. |
|
results |
number
|
The total number of results in the page to which this links, if this link refers to a page of resources. |
|
Example
{
"href" : "...",
"template" : "...",
"title" : "...",
"type" : "...",
"accept" : "...",
"allow" : "...",
"hreflang" : "...",
"count" : 12345,
"offset" : 12345,
"results" : 12345
}