Comments (12)
Is there an example client I could try? What about https://lrs.adlnet.gov/prototypes/ ? Does that work? Also we have those prototypes at https://github.com/creighton/experienceapi_client_examples . You could download them and see if they work. Sorry, I'm just trying to figure out if this is a bug in the LRS.
According to the spec, all requests and responses need to have the X-Experience-API-Version header. See https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#apiversioning .. For example in https://lrs.adlnet.gov/prototypes/StatementViewer/index.html, you should see the header in both the request and response.
In the .95 version I took the header requirement off of /statements just so people could use the link you pasted and see results without having to deal with headers. Maybe I could do that again on the hosted LRS but it would technically not be conformant to the spec anymore.
from adl_lrs.
Hi Tom
https://lrs.adlnet.gov/prototypes/ does not work returning Bad Response Missing X-Experience-API-Version header,
I have downloaded the client_examples which I actually can’t get to work against my own installation or indeed the hosted lrs (cannot give you access to my installation localhost only I’m afraid)
Example https://lrs.adlnet.gov/prototypes/StatementViewer/index.html Fiddler shows the following Headers
Reequest Header:
GET /prototypes/StatementViewer/index.html HTTP/1.1
Accept: text/html, application/xhtml+xml, /
Accept-Language: en-GB
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Accept-Encoding: gzip, deflate
Host: lrs.adlnet.gov
If-Modified-Since: Fri, 24 May 2013 15:04:31 GMT
DNT: 1
Connection: Keep-Alive
Response Header:
HTTP/1.1 304 Not Modified
Server: nginx/1.1.19
Date: Fri, 31 May 2013 12:18:49 GMT
Last-Modified: Fri, 24 May 2013 15:04:31 GMT
Connection: keep-alive
From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 13:00
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)
Is there an example client I could try? What about https://lrs.adlnet.gov/prototypes/ ? Does that work? Also we have those prototypes at https://github.com/creighton/experienceapi_client_examples . You could download them and see if they work. Sorry, I'm just trying to figure out if this is a bug in the LRS.
According to the spec, all requests and responses need to have the X-Experience-API-Version header. See https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#apiversioning .. For example in https://lrs.adlnet.gov/prototypes/StatementViewer/index.html, you should see the header in both the request and response.
In the .95 version I took the header requirement off of /statements just so people could use the link you pasted and see results without having to deal with headers. Maybe I could do that again on the hosted LRS but it would technically not be conformant to the spec anymore.
—
Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13
from adl_lrs.
Sorry gazza, when I hit https://lrs.adlnet.gov/prototypes the requests have headers. (I'll attach the output from Chrome's debugger below)
Could your browser be caching? Your headers also don't have Authorization, and the response headers have none of the headers I was expecting to see, like the X-Experience-API-Version
Also, try this cURL command: curl -H "X-Experience-API-Version:1.0.0" --user tom:1234 https://lrs.adlnet.gov/xapi/statements?limit=1 That should give you a response.
----- Chrome debugger output -----
Request URL:https://lrs.adlnet.gov/XAPI/statements?limit=25&format=exact
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:Basic dG9tOjEyMzQ=
Connection:keep-alive
Content-Type:application/json
Cookie:__utma=40047858.1688851668.1330898169.1368210538.1369250074.51; __utmz=40047858.1361567553.26.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://www.adlnet.gov/); csrftoken=JBJbpRe2fnaQ0u62Sb79wAV4MD1aFGi9; sessionid=4565f9f6bbffa5a237b9f6e0132e2aa5
Host:lrs.adlnet.gov
Referer:https://lrs.adlnet.gov/prototypes/StatementViewer/index.html
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
X-Experience-API-Version:1.0
Query String Parametersview sourceview URL encoded
limit:25
format:exact
Response Headersview source
Access-Control-Allow-Headers:Content-Type,Content-Length,Authorization,If-Match,If-None-Match,X-Experience-API-Version, Accept-Language
Access-Control-Allow-Methods:HEAD, POST, GET, OPTIONS, DELETE, PUT
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:ETag,Last-Modified,Cache-Control,Content-Type,Content-Length,WWW-Authenticate,X-Experience-API-Version, Accept-Language
Connection:keep-alive
Content-Length:26784
Content-Type:application/json
Date:Fri, 31 May 2013 11:43:02 GMT
Server:gunicorn/0.14.2
X-Experience-API-Consistent-Through:2013-05-28 13:55:33.912693+00:00
X-Experience-API-Version:1.0.0
X-Frame-Options:SAMEORIGIN
from adl_lrs.
Hi Tom,
Its looking like an IE 10 problem the prototypes are working fine using Firefox, will do some more digging and see if my installation is working under firefox
Gary
From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 13:57
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)
Sorry gazza, when I hit https://lrs.adlnet.gov/prototypes the requests have headers. (I'll attach the output from Chrome's debugger below)
Could your browser be caching? Your headers also don't have Authorization, and the response headers have none of the headers I was expecting to see, like the X-Experience-API-Version
Also, try this cURL command: curl -H "X-Experience-API-Version:1.0.0" --user tom:1234 https://lrs.adlnet.gov/xapi/statements?limit=1 That should give you a response.
Request URL:https://lrs.adlnet.gov/XAPI/statements?limit=25&format=exact
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:Basic dG9tOjEyMzQ=
Connection:keep-alive
Content-Type:application/json
Cookie:__utma=40047858.1688851668.1330898169.1368210538.1369250074.51; __utmz=40047858.1361567553.26.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://www.adlnet.gov/); csrftoken=JBJbpRe2fnaQ0u62Sb79wAV4MD1aFGi9; sessionid=4565f9f6bbffa5a237b9f6e0132e2aa5
Host:lrs.adlnet.gov
Referer:https://lrs.adlnet.gov/prototypes/StatementViewer/index.html
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
X-Experience-API-Version:1.0
Query String Parametersview sourceview URL encoded
limit:25
format:exact
Response Headersview source
Access-Control-Allow-Headers:Content-Type,Content-Length,Authorization,If-Match,If-None-Match,X-Experience-API-Version, Accept-Language
Access-Control-Allow-Methods:HEAD, POST, GET, OPTIONS, DELETE, PUT
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:ETag,Last-Modified,Cache-Control,Content-Type,Content-Length,WWW-Authenticate,X-Experience-API-Version, Accept-Language
Connection:keep-alive
Content-Length:26784
Content-Type:application/json
Date:Fri, 31 May 2013 11:43:02 GMT
Server:gunicorn/0.14.2
X-Experience-API-Consistent-Through:2013-05-28 13:55:33.912693+00:00
X-Experience-API-Version:1.0.0
X-Frame-Options:SAMEORIGIN
—
Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13
from adl_lrs.
Oooh yeah, sorry I thought your header was saying you were using Firefox. My bad for not catching that. The prototypes don't work with IE. I don't remember the exact issue but it has to do with the way IE sends requests. There is an IE example in the spec, if you're adventurous you could try that example, but the way the prototypes do requests won't work right in IE.
from adl_lrs.
Thanks Tom, was trying the tetris prototype against my installation and got the following
Activity definition type media is not a valid URI
Probably something I did wrong on the installation can you point me in a direction to have a look at
Thanks
From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 14:16
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)
Oooh yeah, sorry I thought your header was saying you were using Firefox. My bad for not catching that. The prototypes don't work with IE. I don't remember the exact issue but it has to do with the way IE sends requests. There is an IE example in the spec, if you're adventurous you could try that example, but the way the prototypes do requests won't work right in IE.
—
Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13
from adl_lrs.
Hi Gary,
For the 'media' issue you're having, make sure the prototypes you're
running are from the 1.0 folder. The tetris examples create a statement and
use 'media' as the activity definition type in the 0.95 prototypes but that
had to be changed to be xAPI 1.0.0 conformant to 'type:media' in the 1.0
prototypes folder.
Thanks,
Lou
On Fri, May 31, 2013 at 9:19 AM, gazzastone [email protected]:
Thanks Tom, was trying the tetris prototype against my installation and
got the followingActivity definition type media is not a valid URI
Probably something I did wrong on the installation can you point me in a
direction to have a look atThanks
From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 14:16
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)Oooh yeah, sorry I thought your header was saying you were using Firefox.
My bad for not catching that. The prototypes don't work with IE. I don't
remember the exact issue but it has to do with the way IE sends requests.
There is an IE example in the spec, if you're adventurous you could try
that example, but the way the prototypes do requests won't work right in
IE.—
Reply to this email directly or view it on GitHub <
https://github.com/adlnet/ADL_LRS/issues/160#issuecomment-18744049> . <
https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif>
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13—
Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-18744211
.
Lou Wolford
Advanced Distributed Learning (ADL)
Technical Team
from adl_lrs.
Hi Lou,
I am running from the 1.0 Folder, are you referring to the TC_Tetris.js files for the definition which appear identical in the 0.95 and 1.0 folders
Thanks
Gary
From: Lou Wolford [mailto:[email protected]]
Sent: 31 May 2013 15:49
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)
Hi Gary,
For the 'media' issue you're having, make sure the prototypes you're
running are from the 1.0 folder. The tetris examples create a statement and
use 'media' as the activity definition type in the 0.95 prototypes but that
had to be changed to be xAPI 1.0.0 conformant to 'type:media' in the 1.0
prototypes folder.
Thanks,
Lou
On Fri, May 31, 2013 at 9:19 AM, gazzastone [email protected]:
Thanks Tom, was trying the tetris prototype against my installation and
got the followingActivity definition type media is not a valid URI
Probably something I did wrong on the installation can you point me in a
direction to have a look atThanks
From: tom creighton [mailto:[email protected]]
Sent: 31 May 2013 14:16
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)Oooh yeah, sorry I thought your header was saying you were using Firefox.
My bad for not catching that. The prototypes don't work with IE. I don't
remember the exact issue but it has to do with the way IE sends requests.
There is an IE example in the spec, if you're adventurous you could try
that example, but the way the prototypes do requests won't work right in
IE.—
Reply to this email directly or view it on GitHub <
https://github.com/adlnet/ADL_LRS/issues/160#issuecomment-18744049> . <
https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif>
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13—
Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-18744211
.
Lou Wolford
Advanced Distributed Learning (ADL)
Technical Team
—
Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13
from adl_lrs.
Yup that's the file I'm referring too. We pushed out the change at the end of last week so your local repository might be out of sync. Try pulling down the new prototype examples from master and try that.
from adl_lrs.
Mmmm, modifying lines 100 and 122 from type:”media” to type: “http://adlnet.gov/expapi/activities/media “ did the trick am I missing something on my local installation ?
Thanks
Gary
From: Lou Wolford [mailto:[email protected]]
Sent: 31 May 2013 16:29
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)
Yup that's the file I'm referring too. We pushed out the change at the end of last week so your local repository might be out of sync. Try pulling down the new prototype examples from master and try that.
—
Reply to this email directly or view it on GitHub #160 (comment) . https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13
from adl_lrs.
It appears that your local installation is out of date. If you pull down
the current changes from git to your local repository, it should fix all of
the issues you're having.
Thanks,
Lou
On Fri, May 31, 2013 at 11:49 AM, gazzastone [email protected]:
Mmmm, modifying lines 100 and 122 from type:”media” to type: “
http://adlnet.gov/expapi/activities/media “ did the trick am I missing
something on my local installation ?Thanks
Gary
From: Lou Wolford [mailto:[email protected]]
Sent: 31 May 2013 16:29
To: adlnet/ADL_LRS
Cc: gazzastone
Subject: Re: [ADL_LRS] Posting a statement (#160)Yup that's the file I'm referring too. We pushed out the change at the end
of last week so your local repository might be out of sync. Try pulling
down the new prototype examples from master and try that.—
Reply to this email directly or view it on GitHub <
https://github.com/adlnet/ADL_LRS/issues/160#issuecomment-18752053> . <
https://github.com/notifications/beacon/J9h5ZIVIL0hB_z74xUpY8xrmjl0ks81dV01MG4B9yC8ohw418TZrylVM5MQJsBC1.gif>
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6370 - Release Date: 05/30/13—
Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-18753466
.
Lou Wolford
Advanced Distributed Learning (ADL)
Technical Team
from adl_lrs.
Gary,
We hope you got everything working for you. If you have any other issues, feedback, or questions, please let us know. I'm closing this for now.. If it's not resolved feel free to reopen with any new information.
regards,
tom
from adl_lrs.
Related Issues (20)
- python-devlibxml2-dev HOT 2
- Ascending=false returning statements in ascending order.
- Unable to use the ADL_LRS API from an example_script based on TinCanPython HOT 2
- S3 Storage Option for Media files HOT 2
- Support proxy https (Ex: Amazon ALB) HOT 1
- Installation on Windows HOT 5
- Fatal error: local() encountered an error (return code 1) while executing './manage.py test lrs.tests' HOT 1
- /lrs/req_process.py ,check_activity_metadata.delay(stmt_ids) ,what is delay? HOT 1
- Installation issue HOT 1
- Encounters an error HOT 5
- ModuleNotFoundError: No module named 'ConfigParser'
- SuspiciousFileOperation: Storage can not find an available filename for "activity_state/ HOT 2
- Running in a subpath is not supported HOT 1
- ImportError: cannot import name get_app when Clearing the Database
- Migration plan for python3 due to Python2 EOL already being passed HOT 4
- Postgres Adapter Field Deprecations HOT 1
- Roadmap/Project Status HOT 2
- Project dependencies may have API risk issues
- OAuth 'Could not verify OAuth request'
- Should master branch work? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adl_lrs.