API for LabCollector (v5.4+) - LabCollector

Search Knowledge Base by Keyword

API for LabCollector (v5.4+)

You are here:
← All Topics

Note: Since June 2017 API v1 was discontinued and all new evolutions are in API v2.

TUBE SORTER

– Method: GET
– URL: http://[my_labcollector_url]/ webservice/index.php?v=2&action=tube_sorter
– Headers: X-LC-APP-Auth, Accept
– Parameters: at least one must be present

  • box_id
  • box_name
  • record_name
  • unique_code (example:123456)
  • barcode (example: 123/SP)
  • aliquot_barcode (example: A245)

– Response: list of items that match the search parameters, with the following fields:

  • count
  • unique_code
  • name
  • box_id
  • box_name
  • box_details
  • box_features
  • api_storage_typ
  • volume
  • volume_uni
  • module_name
  • module_short_name
  • location

– Example:


REMOVE VOLUME

– Method: PUT
– URL: http://[my_labcollector_url]/ webservice/index.php?v=2
– Headers: X-LC-APP-Auth, Accept
– Parameters: note that for PUT request, parameters must be on body (not in URL)

  • removeVolume (mandatory)
  • barcode, unique_code or aliquot_barcode (one of them must be present)
  • quantity (mandatory)

– Response: OK
– Example:


REMOVE STORAGE

– Method: PUT
– URL: http://[my_labcollector_url]/ webservice/index.php?v=2
– Headers: X-LC-APP-Auth, Accept
– Parameters: note that for PUT request, parameters must be on body (not in URL)

  • removeStorage (mandatory)
  • barcode, unique_code or aliquot_barcode (one of them must be present)

– Response: OK


GET BACKUP

– Method: GET
– URL: http://[my_labcollector_url]/ webservice/index.php?v=2&action=getBackup
– Headers: X-LC-APP-Auth, Accept
– Parameters: last (optional) just add “&last=1” to URL or “/last” to short URL
– Response: list of backups on backup folder ordered by date


ADD REGISTRY BOOK NEW!

– Method: PUT
– URL: http://[my_labcollector_url]/webservice/index.php?v=2&module=[module]
– Headers: X-LC-APP-Auth, Accept
– Parameters: note that for PUT request, parameters must be on the body (not in URL)

  • addRegistryBook (mandatory)
  • record_id (mandatory)
  • date (mandatory, format yyyy/mm/dd or yyyy-mm-dd)
  • comments (mandatory)
  • operator (optional, if it does not send the API default operator will be used)
  • action (optional, must be a valid ‘Storage Action Type’ defined in LC >Admin >Preferences > Process & Actions Type)

– Response: OK
– Example:


GET USERS NEW!

– Method: GET
– URL: http://[my_labcollector_url]/ webservice/index.php?v=2&action=getUser
– Headers: X-LC-APP-Auth, Accept
– Parameters:

  • user_id (optional, find by user id)
  • user_name (optional, find by user name)

– Response: List of users
– Example: