The Data API covers several groups of sub-APIs.
6 xAPI data exploration APIs:
5 xAPI vocab exploration API:
1 persons management API:
The Data API is enabled globally by default, and can be disabled with the DATA_API
config option set to false
.
It is fully accessible to all the clients which have the data/all
permission enabled.
The API endpoints rely on the store endpoint of each client.
In this documentation, we will designate the store endpoint by <store-endpoint>
.
To get the store endpoint of a client:
Access > API Consumers > Clients
page.(i)
icon of a client.Store endpoint
label. Use the GET
method on <store-endpoint>/statements
with the following optional params:
Param | Description |
---|---|
agent | JSON encoded xAPI agent |
verb | Full IRI of a verb |
activity | Full IRI of an activity |
since | ISO 8601 date |
until | ISO 8601 date |
type | Full IRI of an activity type |
profile | Full IRI of an xAPI profile |
pseudonymized | Boolean |
voided | Boolean |
rearrange | Boolean. Use it to rearrange the order of the statement properties in a more readable way. |
agent_location | String: actor , object , everywhere . Where to search the specified agent. |
activity_location | String: object , everywhere . Where to search the specified activity. |
Use the GET
method on <store-endpoint>/activities
with the following optional params:
Param | Description |
---|---|
activityId | Full IRI of an activity |
type | Full IRI of an activity type |
is_category | Boolean. Set to true to get only activities which have been identified as a statement category. |
is_profile | Boolean. Set to true to get only activities which have been identified as an xAPI profile. |
rearrange | Boolean. Use it to rearrange the order of the activity properties in a more readable way. |
Use the GET
method on <store-endpoint>/agents
with the following optional params:
Param | Description |
---|---|
agent | JSON encoded xAPI agent |
type | String: all , agents , groups , groups_with_members |
sid_type | String: mbox , mbox_sha1sum , openid , account |
location | String: all , agent , group , member . Where to search the agent. |
join_members | Boolean. Set to true to join members when the agent is a group. |
Use the GET
method on <store-endpoint>/activity-profiles
with the following optional params:
Param | Description |
---|---|
profileId | String |
activityId | Full IRI of an activity |
since | ISO 8601 date |
type | MIME type |
Use the GET
method on <store-endpoint>/agent-profiles
with the following optional params:
Param | Description |
---|---|
profileId | String |
agent | JSON encoded xAPI agent |
since | ISO 8601 date |
type | MIME type |
Use the GET
method on <store-endpoint>/states
with the following optional params:
Param | Description |
---|---|
stateId | String |
agent | JSON encoded xAPI agent |
activityId | Full IRI of an activity |
registration | UUID |
since | ISO 8601 date |
type | MIME type |
Use the GET
method on <store-endpoint>/verbs
with the following optional params:
Param | Description |
---|---|
in_iri | String to be searched in the verb IRI |
Use the GET
method on <store-endpoint>/activity-types
with the following optional params:
Param | Description |
---|---|
in_iri | String to be searched in the activity type IRI |
Use the GET
method on <store-endpoint>/activity-ids
with the following optional params:
Param | Description |
---|---|
in_iri | String to be searched in the activity IRI |
is_category | Boolean. Set to true to get only activities which have been identified as a statement category. |
is_profile | Boolean. Set to true to get only activities which have been identified as an xAPI profile. |
Use the GET
method on <store-endpoint>/agent-ids
with the following optional params:
Param | Description |
---|---|
sid_type | String: mbox , mbox_sha1sum , openid , account |
in_sid_field_1 | String to be searched in the agent ID, or in the name prop if the agent has the account format. |
in_sid_field_2 | String to be searched in the homePage prop if the agent has the account format. |
Use the GET
method on <store-endpoint>/document-ids
with the following optional params:
Param | Description |
---|---|
in_name | String to be searched in the document name (profileId or stateId) |
in_type | String to be searched in the document MIME type |
mime_type | MIME type of the document |
doc_type | String: activity-profile , agent-profile , state |
Use the POST
method on <store-endpoint>/persons
.
The body must be a JSON content which takes the form of a list of persons, each person being a list of agents.
For example:
[
[
{
"mbox": "mailto:john@doe.com"
},
{
"openid": "http://openid.com/john-doe"
},
],
[
{
"mbox": "mailto:jack@white.com"
},
{
"account": {
"name": "jack.white",
"homePage": "http://my-lms.com"
}
},
],
]
Use the GET
method on <store-endpoint>/persons
with the following required param:
Param | Description |
---|---|
agent | JSON encoded xAPI agent |
The request will return the list of the agents of the specified person in a linear way. For example:
{
"data": [
{
"name": "John Doe",
"mbox": "mailto:john@doe.com"
},
{
"openid": "http://openid.com/john-doe"
},
]
}