Eln Api V1 20190611

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

ELN API V1

1/ URL

 URL: http://[labcollector_url]/extra_modules/eln/webservice/index.php?v=1

 HEADER PARAMS:
o X-LC-APP-Auth
o Accept=application\json or Accept = text\xml

2/ GET

Recover data of books, experiments & pages

 Mandatory params:
o UID (user identifier). supports numeric value or string value (=login).
Example UID=1 or UID=admin

 Optional params:
o bookid (book identifier) example bookid=1
o datefrom (books created after of). Example datefrom=2010- 01-01
o dateto (books created before of). Example datefrom=2016- 01-01
o action: getBooks, getExperiments, getPages, getPageImages, getPageContent

 Examples:

- action=getBooks
http://dev.agilebio.com/neosoft/extra_modules/eln/webservice/index.php?v=1&UID=1&action=g
etBooks
- action=getExperiments
http://dev.agilebio.com/neosoft/extra_modules/eln/webservice/index.php?v=1&UID=1&action=g
etExperiments&bookid=1
- action=getPages
http://dev.agilebio.com/neosoft/extra_modules/eln/webservice/index.php?v=1&UID=1&action=g
etPages&experimentid=7
- action=getPageImages
http://dev.agilebio.com/neosoft/extra_modules/eln/webservice/index.php?v=1&UID=1&action=g
etPageImages&pageid=3
- action=getPageContent
http://dev.agilebio.com/neosoft/extra_modules/eln/webservice/index.php?v=1&UID=1&action=g
etPageContent&pageid=58

 Note: field page_img_status means if the page has image or not. '1' means page has an
image, '0' means page has not an image
2/ POST

Create or update pages and send images and/or content

 Mandatory params:
o UID (user identifier) example UID=1

 Optional params
o image (image file -form data-)
o content (html content)
o pageid (page identifier) example pageid=134

If page is not created you can also create page, leaving out param pageid and adding
params experimentid and name:

o experimentid (experiment identifier) example experimentid=8


o name (page name) example name=page from api'

 Response
Response is formated as JSON or XML (not just a text OK), example:
{
"@attributes": {
"message": "OK"
}
}

 Examples:
o To create a new page user parameters: experimentid and name and optionally
content and/or image
o To update a existing page use parameters: pageid and optionally content and/or
image

You might also like