LabCollector Web Service API

Similar documents
Issue No. Date Description of Changes Initial issue Added basic authentication

Alloy Navigator API USER S GUIDE. Integration with External Systems. Product Version: 7.0 Document Revision: 1.0 Date: November 30, 2015

Documentation Module: Magento products integration for WordPress Version: 1.0.0

Ninox API. Ninox API Page 1 of 15. Ninox Version Document version 1.0.0

vrealize Log Insight Developer Resources

vrealize Log Insight Developer Resources Update 1 Modified on 03 SEP 2017 vrealize Log Insight 4.0

User Guide For LabCollector Workflow Manager

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

WEB API. Nuki Home Solutions GmbH. Münzgrabenstraße 92/ Graz Austria F

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL. TWO MARKS

Develop Mobile Front Ends Using Mobile Application Framework A - 2

GMA024F0. GridDB Web API Guide. Toshiba Digital Solutions Corporation 2017 All Rights Reserved.

Black Box DCX3000 / DCX1000 Using the API

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

Yunpian API Documents

Workflow Manager. October 2017

Technical Note. Isilon OneFS. Isilon Swift Technical Note. Version August 2017

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one

Writing REST APIs with OpenAPI and Swagger Ada

Digital Imaging and Communications in Medicine (DICOM) Supplement 194: RESTful Services for Non-Patient Instances

User s Guide For LabCollector PhotoBank

Using OAuth 2.0 to Access ionbiz APIs

DICOM Correction Proposal

ClickToCall SkypeTest Documentation

GENERAL SETUP (Restricted access to the Super-Administrator)

Introduction to Cisco TV CDS Software APIs

KidyTour REST API USER GUIDE

UNIVERSITY OF TARTU FACULTY OF SCIENCE AND TECHNOLOGY INSTITUTE OF COMPUTER SCIENCE INFORMATICS. CVE Hiie-Helen Raju

Designing RESTful Web Applications. Ben Ramsey

CSC Web Programming. Introduction to SQL

PHP & PHP++ Curriculum

API Spec Sheet For Version 2.5

Programming for the Web with PHP

Chapter 1 - Consuming REST Web Services in Angular

Microsoft Office Illustrated. Using Tables

Device Recognition Best Practices Guide

ovirt SSO Specification

Manage Workflows. Workflows and Workflow Actions

Mopidy-Podcast Documentation

C22: Browser & Web Server Communication

HappyFox API Technical Reference

RESTful API TLS/SSL. InCommon c/o Internet Oakbrook Drive, Suite 300 Ann Arbor MI, 48104

Volante NACHA ISO20022 Validator AMI User Guide

XQ: An XML Query Language Language Reference Manual

IPConfigure Embedded LPR API

All requests must be authenticated using the login and password you use to access your account.

Unraveling the Mysteries of J2EE Web Application Communications

Usage of "OAuth2" policy action in CentraSite and Mediator

WWPass External Authentication Solution for IBM Security Access Manager 8.0

(Frequently Asked Questions)

Salesforce IoT REST API Getting Started Guide

RSA NetWitness Logs. Salesforce. Event Source Log Configuration Guide. Last Modified: Wednesday, February 14, 2018

NIELSEN API PORTAL USER REGISTRATION GUIDE

Open an existing database Sort records in a table Filter records in a table Create a query Modify a query in Design view

Apache Wink User Guide

YMM Products Parts Finder

EPL660: Information Retrieval and Search Engines Lab 3

LUCITY REST API INTRODUCTION AND CORE CONCEPTS

Hostopia WebMail Help

Federated Search Developer Guide

ExtraHop 7.3 ExtraHop Trace REST API Guide

PrepAwayExam. High-efficient Exam Materials are the best high pass-rate Exam Dumps

Tutorial: Building the Services Ecosystem

Release Highlights

Oracle APEX 18.1 New Features

5.1 Registration and Configuration

Composer Help. Web Request Common Block

Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations. SQL: Structured Query Language

Oracle Big Data Discovery Cloud Service

Greyhead.net. How-to docs and tutorials. ChronoConnectivity How-to doc Static filters for your listing CHRONO. Connectivity

Introduction & Basics! Technical Foundation! Authentication! Obtaining a token!... 4 Using the token! Working with notes!...

REST A brief introduction

IaaS API Reference (Management Administration)

I was given the following web application: and the instruction could be found on the first page.

Account Activity Migration guide & set up

Introduction to yada. Malcolm

CNIT 129S: Securing Web Applications. Ch 10: Attacking Back-End Components

P3e REPORT WRITER CREATING A BLANK REPORT

Data Querying, Extraction and Integration II: Applications. Recuperación de Información 2007 Lecture 5.

Documentation to use the System Imbalance service

Checkout Service API User Guide

What is SQL? Toolkit for this guide. Learning SQL Using phpmyadmin

SEO EXTENSION FOR MAGENTO 2

Apache Wink 0.1 Feature Set

Integration Guide. LoginTC

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

USSD HTTP API SPECIFICATION Version 1.0 Teletalk Bangladesh Limited

An Introduction to JavaScript & Bootstrap Basic concept used in responsive website development Form Validation Creating templates

RESTful API Design APIs your consumers will love

Magento Survey Extension User Guide

Tags Resource and TagTrends Resource Operations

Product Guide Marketo Integration

Nasuni Data API Nasuni Corporation Boston, MA

Blueprint REST API Developer Guide

OAuth2 Autoconfig. Copyright

CERTIFICATE IN WEB PROGRAMMING

GitHub-Flask Documentation

How A Website Works. - Shobha

MarkLogic Server. REST Application Developer s Guide. MarkLogic 9 May, Copyright 2017 MarkLogic Corporation. All rights reserved.

Protect Your API with OAuth 2. Rob Allen

Transcription:

LabCollector Web Service API The LabCollector Web Service Application Programming Interface (API) allows third-party applications to interact with LabCollector's database (modules). The API is based on a Representational State Transfer (REST) architecture allowing access to resources through Uniform Resource Identifier (URI) and actions on them. 1. API Setup First of all, you have to declare your application in your LabCollector software. To access the application declaration setup form, log-in into LabCollector with superadministrator rights and go to Admin > Setup page. Then select the Web Service API link. You are now on the Web Service API applications management page. To declare a new application, simply complete this form. Name: name of your application. Modules connected to this application: select modules in which the application can access. IP Restriction: security option that allows you to declare a list of IP addresses, which 1

will be allowed to perform requests on the API. The Application list shows all the applications for your LabCollector and you can, at any time, modify their scope. You have also access to the Token which is necessary to identify your application during requests to the API. Note: In order to use this feature, you need to activate Curl on your PHP preferences. In Linux, install PHP-Curl package. On windows and with our automatic installer, edit PHP.INI and uncomment extensions for Curl (extension=php_curl.dll). 2. REQUESTS The dialog between third-party applications and the LabCollector web service API is based on the HTTP 1.1 protocol. 2-1. API Method You can send HTTP request to the web service with a method to perform an action on a resource. method for read a resource method to create new resource method to modify a resource DELETE method to delete a resource 2

2-2. Headers A request to the API requires some specific HTTP headers: The Accept header defines the desired response format of your request, text/xml (default) or application/json. The X-LC-APP-Auth header where you put your application token which is necessary to authorize your request to the API. The X-LC-APP-Charset header defines the character encoding of your application. It allows the API to send back the response with the appropriate encoding and to correctly convert your and requests to the LabCollector's character encoding (ISO 8859-1). 3. Uniform Resource Identifier (URI) 3-1. Method Each LabCollector module data is identified by a unique URI (see annex for a complete list of module's URI): [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE] This request replies the list of all data in a module. You can do searching into module data by adding parameters to your URI. You can pass a parameter with a keyword matching a field value, like: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?name=[KEYWORD] e.g. [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?name=First%20Record This request returns the records where their name value contains the First Record keyword. They are some custom parameters that the API uses to perform searching and filtering actions: The record_id parameter to specify data by its ID: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?record_id=[RECORD_ID] e.g. [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?record_id=1,19 This request returns records with ID 1 and ID 19. You can specify multiple IDs by separating them with a comma. 3

The by_keywords parameter performs a keyword search: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?by_keywords=[KEYWORD] e.g. [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?by_keywords=cell This request performs a search into all fields of all records and returns matching cell. You can specify multiple keywords by separating them with a comma. The fields parameters, If you want to retrieve only some fields values in the API response: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?fields=[FIELD1],[FIELD2] e.g. [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?fields=count,name This request returns all records from the module but with only count and name fields. You can specify multiple fields by separating them with a comma. The sort_by parameter allows you to sort your search: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?sort_by=[FIELD1]_DESC e.g. [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?sort_by=name_DESC This request returns all records sorted in descending order on the name field. You can specify multiple sort_by separating them with a comma, and specified order ascendant _ASC or descendant _DESC for each field. The limit_to parameter allows you to limit the number of results: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]?limit_to=0,10 This request returns 10 records beginning at the index 0. If you do not specify the index, only the number of result indicated is returned. The API also returns two custom fields in the header response, X-LC-QUERY-RESULT containing the number of results returned in the body response and X-LC-QUERY-TOTAL containing the total of records matching your search. Each record also has a unique URI: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]/[DATA_ID] This request replies a unique record. [DATA_ID] must match the unique ID of the record you want to retrieve. 3-1-1. Tube Sorter filtering functions 4

[PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&box_id=[BOX_ID] e.g. [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&box_id=34 This request returns storage info on box ID 34 like tube sorter. You can specify multiple IDs by separating them with a comma. [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&box_id=[BOX_ID]&record_name=[RECORD_ NAME] e.g. [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&box_id=206&record_name=ST-260 [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&record_name=[RECORD_NAME] e.g. [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&record_name=ST-260 These requests perform filtering on record named ST-260. You can specify multiple record names by separating them with a comma. You can also specify box ID, here 206. [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&box_name=[BOX_NAME] e.g. [PATH_TO_LABCOLLECTOR]/webservice/index.php?v=1&action=tube_sorter&box_name=test-rack_06 This request performs filtering on box test-rack_06. You can specify multiple box names by separating them with a comma. 3-2. Method To create a new resource, simply send a request with the method to the desired module URI: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE] Your parameter keys have to match the field s name. 3-3. Method To modify a resource, simply send a request with the method to the desired record URI: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]/[DATA_ID] Your parameter keys have to match the field s name you want to modify. 3-4. DELETE Method 5

To delete a resource, simply send a request width the DELETE method to the desired record URI: [PATH_TO_LABCOLLECTOR]/webservice/v1/[MODULE]/[DATA_ID] 6

LabCollector Web Service API - ANNEX Web Services API URI list The URI system of the API uses simple and clean URL. Be sure to enable the rewrite engine from Apache to use the URI referenced in the following table. If the LabCollector server does not support rewrite engine please use the full URL pattern for your request (secondary URL of each line). URI Module Description webservice/v1/strains webservice/index.php?v=1&module=strains Strains & Cells webservice/v1/strains/[data_id] webservice/index.php?v=1&module=strains&data_id=[data_id] Strains & Cells webservice/v1/strains/customfields webservice/index.php?v=1&module=strains&getmodulecustomfields=1 Strains & Cells List of custom fields webservice/v1/strains/organisms webservice/index.php?v=1&module=strains&getmoduleorganisms=1 Strains & Cells List of organisms webservice/v1/plasmids webservice/index.php?v=1&module=plasmids Plasmids webservice/v1/plasmids/[data_id] webservice/index.php?v=1&module=plasmids&data_id=[data_id] Plasmids webservice/v1/plasmids/customfields webservice/index.php?v=1&module=plasmids&getmodulecustomfields=1 Plasmids List of custom fields webservice/v1/primers webservice/index.php?v=1&module=primers Primers webservice/v1/primers/[data_id] webservice/index.php?v=1&module=primers&data_id=[data_id] Primers webservice/v1/primers/customfields webservice/index.php?v=1&module=primers&getmodulecustomfields=1 Primers List of custom fields webservice/v1/chemicals Reagents & 7

webservice/index.php?v=1&module=chemicals Supplies webservice/v1/chemicals/[data_id] webservice/index.php?v=1&module=chemicals&data_id=[data_id] Reagents & Supplies webservice/v1/chemicals/customfields webservice/index.php?v=1&module=chemicals&getmodulecustomfields=1 Reagents & Supplies List of custom fields webservice/v1/samples webservice/index.php?v=1&module=samples Samples webservice/v1/samples/[data_id] webservice/index.php?v=1&module=samples&data_id=[data_id] Samples webservice/v1/samples/customfields webservice/index.php?v=1&module=samples&getmodulecustomfields=1 Samples List of custom fields webservice/v1/samples/organisms webservice/index.php?v=1&module=samples&getmoduleorganisms=1 Samples List of organisms webservice/v1/samples/types webservice/index.php?v=1&module=samples&getmoduletypes=1 Samples List of sample types webservice/v1/antibodies webservice/index.php?v=1&module=antibodies Antibodies webservice/v1/antibodies/[data_id] webservice/index.php?v=1&module=antibodies&data_id=[data_id] Antibodies webservice/v1/antibodies/customfields webservice/index.php?v=1&module=antibodies&getmodulecustomfields=1 Antibodies List of custom fields webservice/v1/sequences webservice/index.php?v=1&module=sequences Sequences webservice/v1/sequences/[data_id] webservice/index.php?v=1&module=sequences&data_id=[data_id] Sequences webservice/v1/sequences/customfields webservice/index.php?v=1&module=sequences&getmodulecustomfields=1 Sequences List of custom fields webservice/v1/animals webservice/index.php?v=1&module=animals Animals 8

webservice/v1/animals/[data_id] webservice/index.php?v=1&module=animals&data_id=[data_id] Animals webservice/v1/animals/customfields webservice/index.php?v=1&module=animals&getmodulecustomfields=1 Animals List of custom fields webservice/v1/equipments webservice/index.php?v=1&module=equipments Equipment webservice/v1/equipments/[data_id] webservice/index.php?v=1&module=equipments&data_id=[data_id] Equipment webservice/v1/equipments/customfields webservice/index.php?v=1&module=equipments&getmodulecustomfields=1 Equipment List of custom fields webservice/v1/structures webservice/index.php?v=1&module=structures Chemical Structures webservice/v1/structures/[data_id] webservice/index.php?v=1&module=structures&data_id=[data_id] Chemical Structures webservice/v1/structures/customfields webservice/index.php?v=1&module=structures&getmodulecustomfields=1 Chemical Structures List of custom fields webservice/v1/docs webservice/index.php?v=1&module=docs Documents webservice/v1/docs/[data_id] webservice/index.php?v=1&module=docs&data_id=[data_id] Documents webservice/v1/docs/customfields webservice/index.php?v=1&module=docs&getmodulecustomfields=1 Documents List of custom fields webservice/v1/docs/categories webservice/index.php?v=1&module=docs&getmodulecategories=1 Documents List of categories webservice/v1/abook webservice/index.php?v=1&module=abook Address Book webservice/v1/abook/[data_id] webservice/index.php?v=1&module=abook&data_id=[data_id] Address Book webservice/v1/abook/customfields webservice/index.php?v=1&module=abook&getmodulecustomfields=1 Address Book List of custom fields 9

webservice/v1/abook/categories webservice/index.php?v=1&module=abook&getmodulecategories=1 Address Book List of categories webservice/v1/microarrays webservice/index.php?v=1&module=microarrays Microarrays webservice/v1/microarrays/[data_id] webservice/index.php?v=1&module=microarrays&data_id=[data_id] Microarrays webservice/v1/microarrays/customfields webservice/index.php?v=1&module=microarrays&getmodulecustomfields=1 Microarrays List of custom fields webservice/v1/microarrays/organisms webservice/index.php?v=1&module=microarrays&getmoduleorganisms=1 Microarrays List of organisms webservice/v1/[custom_module_name] webservice/index.php?v=1&module=[custom_module_name] Custom Module webservice/v1/[custom_module_name]/[data_id] webservice/index.php?v=1&module=[custom_module_name]&data_id=[data_id] Custom Module webservice/v1/[custom_module_name]/customfields webservice/index.php?v=1&module=[custom_module_name]&getmodulecustomfields=1 Custom Module List of custom fields 10