Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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:

SCHEMA

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.

EXAMPLE

{
  "_id" : "59c1219936229d4ce9634601",
  "organisation" : "59c1219936229d4ce9634602",
  "persona": "59c1219936229d4ce9634603",
  "ifi": {
    "key": "account",
    "value": {
      "homePage": "http://www.example.org",
      "name": "example-user"
    }
  }
}

INVERSE FUNCTIONAL IDENTIFIER

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”.

SCHEMA

Name

Description

key

The type of IFI (accountmboxmbox_sha1sum, or openid).

value

The value of the IFI.

ACCOUNT IFI

{
  "key": "account",
  "value": {
    "homePage": "http://www.example.org",
    "name": "example-user"
  }
}

MBOX IFI

{
  "key": "mbox",
  "value": "mailto:user@example.org"
}

MBOX SHA1SUM IFI

{
  "key": "mbox_sha1sum",
  "value": "cc1e39b02974c5d21e792d7febcaa6018bb6c574"
}

OPENID IFI

{
  "key": "openid",
  "value": "http://www.example.org/example-user"
}

UPSERT HTTP INTERFACE

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"
    }
  }
}

  • No labels