Table des matières

Xperience WebServices Details

Xperience Webservice function :

The Xperience webservice provides 6 functions. These functions can be queried using HTTP requests. They can be reached using URLs created with the webservice address (http://mkey.services.identificationkey.fr) and a path to a webservice function. The seven functions are:

 
 1. /xperience/addrecord
 2. /xperience/getrecord
 3. /xperience/getallitems
 4. /xperience/getfeedbackscsv
 5. /xperience/validate
 6. /xperience/updatesddurl

For instance, the URL to call the first function is: http://mkey.services.identificationkey.fr/xperience/addrecord. These functions return Json objects, and each element returned has a specific name (see Development API).

1. addrecord

Send a new record of an identification process with xperience mod

path : /xperience/addrecord

parameter :

returns :

{ 'status' : 'ok' , 'message' : // , 'spipollsessionid' : 'XXXX-YYYYY' }

error example :

{ 'status' : 'Error' , 'message' : 'Xperiense Data Base not found' ,'spipollsessionid' : 'XXXX-YYYYY' }

2. getrecord

get a history entry

path : /xperience/getrecord

parameter :

returns : feed the json return with the list of taxa given by the user

{ "status" : "ok" , "value" : {"urlimage":"none","items":["979","1077"],"sessionid":"0123456789-id666"} }

error example :

{ "status" : "error" , "value" : {"message":"Record not found","sessionid":"0123456789-id66"} }

3. getallitems

Get list of items in map : Name → Uniqueid

path : /xperience/getallitems

parameter :

returns :

{ "status" : "ok" , "value" : {"items":{"Les Sphinx du Pin et mauresque (<i>Sphinx maurorum<\/i>, <i>Sphinx pinastri<\/i>)":"1031","Les Clairons brillants (<i>Korynetes<\/i> et autres)":"812","L'Ecaille marbrée (<i>Callimorpha dominula<\/i>)":"402"},"sessionid":"0123456789-id666"} }

error example :

{ "status" : "error" , "value" : {"message":"Record not found","sessionid":"0123456789-id66"} }

4. getfeedbackscsv

Get all feedback as CSV in a json return

path : /xperience/getfeedbackscsv

parameter :

returns :

{ 'status' : 'ok' , 'value' : 'LES MATRICES' }

error example :

{ "status":"error" ,"value":{"message":"Xperience Base not found", "baseid":"0123456789"} }

LES MATRICES :

5. validate

Validate a identification process record

path : /xperience/validate

parameter :

returns :

{ "status" : "ok" , "value" : {"message":"record validated","sessionid":"0123456789-id666","taxon":"371"} }

En cas de taxon non trouvé, on renvoie la liste des taxons possibles, dans “items” :

{ "status" : "notfound" , "value" : {"items":{"Les Sphinx du Pin et mauresque (<i>Sphinx maurorum<\/i>, <i>Sphinx pinastri<\/i>)":"1031"},"sessionid":"0123456789-id666","taxon":"1213"} }

error example :

{ "status" : "error" , "value" : {"message":"Record not found","sessionid":"0123456789-id1","taxon":"1213"} }

6. updatesddurl

Update Sdd Url

path : /xperience/updatesddurl

parameter :

returns :

{ 'status' : 'ok' , 'message' : // }

En cas de taxon non trouvé, on renvoie la liste des taxons possibles, dans “items” :

{ 'status' : 'error' , 'message' : 'Xperience Base not found' }

error example :

{ "status" : "error" , "value" : {"message":"Record not found","sessionid":"0123456789-id1","taxon":"1213"} }