Represents a unique identifier for a person. Statements that use these identifiers are linked to the persona that the identifier belongs to.
It is accessible through the following HTTP interfaces:
Connection HTTP Interface via http://www.example.org/api/connection/personaidentifier.
REST HTTP Interface via http://www.example.org/api/v2/personaidentifier.
Upsert HTTP Interface via http://www.example.org/api/v2/personaidentifier/upsert.
Name | Description |
---|---|
_id | The id of this identifier. |
organisation | The id of the organisation this identifier belongs to. |
persona | The id of the persona this identifier belongs to. |
ifi | A representation of the inverse functional identifier. |
{ "_id" : "59c1219936229d4ce9634601", "organisation" : "59c1219936229d4ce9634602", "persona": "59c1219936229d4ce9634603", "ifi": { "key": "account", "value": { "homePage": "http://www.example.org", "name": "example-user" } } } |
According to the xAPI specification, an Inverse Functional Identifier (IFI) is “a value of an Agent or Identified Group that is guaranteed to only ever refer to that Agent or Identified Group”.
Name | Description |
---|---|
key | The type of IFI (account, mbox, mbox_sha1sum, or openid). |
value | The value of the IFI. |
{ "key": "account", "value": { "homePage": "http://www.example.org", "name": "example-user" } } |
{ "key": "mbox", "value": "mailto:user@example.org" } |
{ "key": "mbox_sha1sum", "value": "cc1e39b02974c5d21e792d7febcaa6018bb6c574" } |
{ "key": "openid", "value": "http://www.example.org/example-user" } |
This interface creates or updates a persona identifier depending on whether the IFI already exists.
If the persona
property is not set, a persona will be created if the identifier’s IFI doesn’t exist.
If the persona
property is set, the persona must already exist. Otherwise, a 404 response code will be returned.
A request to the upsert route would look something like this:
POST http://www.example.org/api/v2/personaidentifier/upsert Authorization: YOUR_BASIC_AUTH Content-Type: application/json; charset=utf-8 { "ifi": { "key": "account", "value": { "homePage": "http://www.example.org", "name": "example-user" } } } |
The interface will respond with a 200 response code, with detail the created/updated identifier.
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "_id" : "59c1219936229d4ce9634601", "organisation" : "59c1219936229d4ce9634602", "persona": "59c1219936229d4ce9634603", "ifi": { "key": "account", "value": { "homePage": "http://www.example.org", "name": "example-user" } } } |