[Loris-dev] LORIS Jason API for Candidate & Visit creation

István Ákos Mórocz istvan.morocz at mcgill.ca
Wed Jul 12 21:30:05 EDT 2017


dear LORIS developers,

here a kind of a déjà vue problem : it's the issue of using LORIS'
Jason API for Candiate and Visits creation.  we installed the new
17.0.5 LORIS version on an mini-Ubuntu v16.04 VM on VirtualBox.
things went fine till we tried to make use of this API - but, again
the same problem as a month ago with v17.0.1 : error 400 after the
command :

     curl -i -H "Authorization: Bearer xyzXYZ" -H "Content-type:application/json" -X POST -d @newCand.json http://192.168.49.10/api/v0.0.2/candidates/

 	Warning: Couldn't read data from file "newCand.json", this makes an empty
 	Warning: POST.
 	HTTP/1.1 400 Bad Request
 	Date: Thu, 13 Jul 2017 01:04:57 GMT
 	Server: Apache/2.4.18 (Ubuntu)
 	Access-Control-Allow-Origin: *
 	Access-Control-Allow-Headers: *
 	Content-Security-Policy: default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src 'self' data:;
 	Set-Cookie: PHPSESSID=f0o3kdoevt1g9hhtjlh0ns8b07; path=/
 	Expires: Thu, 19 Nov 1981 08:52:00 GMT
 	Cache-Control: no-store, no-cache, must-revalidate
 	Pragma: no-cache
 	Content-Length: 0
 	Connection: close
 	Content-Type: text/html; charset=UTF-8


     cat  newCand.json

 	{
 	    "Candidate" : {
 	        "Project" : "BRAVO",
 	        "PSCID"   : "ABC123",
 	        "DoB"     : "1980-01-01",
 	        "Gender"  : "Male"
 	    }
 	}


     grep  Version  /var/www/IPMSA/Loris/htdocs/api/v0.0.2/candidates/Candidate.php

 	 * PHP Version 5


...while the Candidate.php script in LORIS v17.0.3 (a developer
version to our understanding) makes use of PHP Version 5.5 - and the
file itself is obviously completely different too.  last time Jordan
was very helpful in pointing this out to us !


QUESTIONS :

1) what do you suggest ?  retro-up-grading v17.0.5 --> 17.0.3 ?

2) how will LORIS-MRI work after such a version change which we still need to install and configure ?


thanks for helping !   bye, pisti


   ,-*~'`^`'~*-,._.,-*~'`^`'~*-,._
  '
:        http://noisis.com
  `    istvan.morocz at noisis.com
  :        +1-514-927-1169
  :    istvan.morocz at mcgill.ca
  :  http://cafe.spl.harvard.edu
  ,    http://www.pistikem.org
:       pistikem at gmail.com
  .
   `~*-,._.,-*~'`^`'~*-,._.,-*~'`"


More information about the Loris-dev mailing list