How to execute a query on tin-can statements?

前端 未结 2 1881
独厮守ぢ
独厮守ぢ 2021-01-15 07:59

I am using Learning Locker (Learning Record Store). I succeed inserting statements to it via the REST API. But I did not succeed fetching statements from it. How do I prefor

2条回答
  •  不要未来只要你来
    2021-01-15 08:32

    If it's via javascript you can use the ADL xAPI Wrapper. It simplifies communication with an LRS... https://github.com/adlnet/xAPIWrapper#get-statements

    In general you do a GET request on endpoint /statements... try just that first and see if you get a json response with a "statements" and a "more" property. Then if that works, you can narrow down results with filters. See the spec for the details and options. https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#stmtapiget

    try that curl command.. it should return a statement result albeit from the ADL LRS...

    curl --user tom:1234 GET https://lrs.adlnet.gov/xapi/statements

提交回复
热议问题