I am trying to retrieve statements based off the context.team (which is an Actor of objectType "Group"). I know that although the query says "agent=..." groups can fit in, c.f. http://docs.learninglocker.net/http-xapi-statements/#get-statements:
agent | JSON encoded object containing an IFI to match an agent or group.
I have tried to query:
{{LrsAddress}}:{{LrsPort}}/data/xAPI/statements?agent={"account": { "name": "Team bogus", "homePage": "http://xinfo.example.com/xapi/v1/teams/world_class_team"}}&related_agents=true
I can easily retrieve users because the agent query is {"mbox": "mailto:test@mail.com"} which works, however querying an account should be possible since it is a Inverse Functional Identifier as much as "mbox" cf https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#inversefunctional
The statements I am trying to retrieve are like the following one:
{
"id": "12345678-1234-5678-1234-567812345678",
"actor":{
"objectType": "Agent",
"mbox":"mailto:test@mail.com",
"name": "Agent A"
},
"verb":{
"id":"http://adlnet.gov/expapi/verbs/created",
"display":{
"en-US":"created"
}
},
"object":{
"id":"http://example.adlnet.gov/xapi/example/activity"
},
"context": {
"team": {
"objectType": "Group"
"name": "Team B",
"account": {
"name": "Team bogus",
"homePage": "http://xinfo.example.com/xapi/v1/teams/world_class_team"
},
"instructor" : {
"name": "Trainer C",
"mbox": "mailto:trainerC@mail.com",
"objectType": "Agent"
}
}
}
}
I am using an installation of Learning Locker (v1 I think) as my LRS. I am using Postman for my tests which url encodes for me (I have tried queries by manually encoding them as well and I obtained the same results) (interesting fact, maybe relevant to the question, is that pushing in the LRS %20 for spaces instead of using "_" in the team.account.homepage IRI "http://www.example.com/team%20Bogus" is that they are interpreted once queried in the JSON, I assume they should be avoided in IRI)