GET /actors/
Returns all actors associated with a given service. Can be paginated.
Actor objects should look like:
{
"updated":"2008-05-19T13:41:12-04:00",
"content_type":"text\/x-card",
"content":"BEGIN:VCARD\nVERSION:3.0\nN:Cubin;Barbara;;;\nFN:Barbara Cubin\nADR:;;1114 Longworth House Office Building;Washington;DC;20515;\nTEL;TYPE=work:202-225-2311\nTEL;TYPE=home:307-261-6595\nUID;TYPE=http:\/\/jangle.org\/terms\/#barcode:123458209\nUID;TYPE=http:\/\/jangle.org\/terms\/#URI:1866\nEND:VCARD\n",
"created":"2008-05-19T13:41:12-04:00",
"id":"\/actors\/1866",
"title":"Cubin, Barbara"
},
In this case the actor is being returned as a vCard, although other metadata formats could be used (like, for instance, FOAF). In order to meet the basic needs of Atom, the "title" element is being populated with the Actor's name. The ID is a relative URI in this example, although an absolute URI could also be returned (see this note on relative vs. absolute URIs for connector responses). The keys should mostly correspond to Atom elements. If "content" is being sent, either a content_type key/pair must also be sent, or the Jangle core will default to text/plain.
If alternate representations of the data are available, include a link key:
{
"updated":"2008-05-19T13:41:12-04:00",
"created":"2008-05-19T13:41:12-04:00",
"id":"\/actors\/1865",
"title":"Barrasso, John",
"link": { "http:\/\/jangle.org\/rel\/alternate#http:\/\/xmlns.com\/foaf\/0.1\/":
[
{
"type":"application\/atom+xml",
"href":"\/actors\/1865?record_format=foaf"
}
],
"alternate":
[
{
"type":"application\/atom+xml",
"href":"\/actors\/1865?record_format=foaf"
}
],
},
Jangle uses URIs for link types in an effort to specify with better granularity how to request a specific record type. This is legal in AtomPub. See here for more information.
The same applies for "related" links. For a given actor, you can also send:
{
"updated":"2008-05-19T13:41:12-04:00",
"created":"2008-05-19T13:41:12-04:00",
"id":"\/actors\/1865",
"title":"Barrasso, John",
"link": { "http:\/\/jangle.org\/rel\/related#items":
[
{
"type":"application\/atom+xml",
"href":"\/actors\/1865\/items"
}
],
"related":
[
{
"type":"application\/atom+xml",
"href":"\/actors\/1865\/items"
}
],
},
And this would return an Atom feed with the Items associated with a particular actor.
GET /actors/{id}
Returns an Atom feed with a single entry. The {id} parameter can also be a comma or semicolon separated list or a hyphen separated range. In these cases the feed will contain multiple entries (assuming all of the ids are valid). If the id or ids are all invalid, the connector should return a 404 error.
No "actor" relationships are explicitly defined except:
GET /actors/{id}/authenticate
This is optional and left to the whims of the connector developer as to how it works.