Labii Documentation
HomeFree SignupFree DemoContact Us
  • Getting Started
    • Introduction
    • Quick Start
  • User Guide
    • Interface
      • Side Menu
      • Views
    • Add Record
      • Add a project
      • Add a blank record
      • Add records in bulk
      • Add a record from a template
      • Add record(s) from file(s)
      • Add a template
    • Record List View
      • Table List View
      • Project List View
      • Row List View
      • ❗Import Records
      • Export Records
      • Bulk Operations
        • Bulk Edit Columns
        • Bulk Edit Sections
        • Bulk Print Detail
        • Bulk Print Labels
        • Bulk Print Barcodes
        • Bulk Print QR Codes
        • Bulk Download
        • Use Selected to Add Blank Record
        • Use Selected to Bulk Add Records
    • Record Detail View
      • Columns
      • Sections
      • Notes
      • Signers
      • Versions
      • Activities
      • Visitors
      • Permissions
      • Section
      • Actions
        • Sign
        • Print
        • Share
    • Navbar
      • Search
        • Global search
        • Search at list view
        • Search query
      • Scan
    • Side Menu
      • Dashboard
      • Calendar
      • Notifications
      • Reload Organization
      • Switch Organization
      • Change Data Center
    • Accounts
      • Authentication
      • Setup an account
      • Create an account
      • My Profile
    • AI Integration
      • Prompt box
      • Prompt template
      • ProtocolGPT
      • AI in Widgets
      • Use cases
  • Admin Guide
    • Organization
    • Backups
    • Personnel
    • Certifications
    • Teams
    • Projects
      • Members
    • Applications
    • Tables
      • Columns
      • Sections
      • Filters
    • Workflows
    • Widgets
    • Subscriptions
    • Credits
    • Invoices
    • Single Sign On
      • Google G Suite
      • Okta
      • OneLogin
      • Microsoft Azure
    • API Keys
  • Widgets
    • Overview
    • Column Widgets
      • Form
        • Text inputs
          • Text
          • MultilineText
          • RichText
          • Number
          • RangeUnit
          • Email
          • Phone
          • Secret
          • Link
          • Address
        • Boolean
          • Checkbox
          • Switch
        • DateTime
          • Date
          • Time
          • DateTime
          • Appointment
          • TimeStamp
          • Timezone
        • Dropdown
          • Select
          • MultiSelect
          • ForeignKey
          • ForeignKeys
          • Member
          • Members
        • File
          • Files
          • Image
          • File Path
          • File Size
          • File Antivirus Status
      • Barcode
        • Barcode
        • QR Code
      • Calculation
        • Formula
        • Numbering
        • RowCount
        • Consumption
      • Integration
        • API
          • API
        • Dropdown
          • API ForeignKey
          • API ForeignKeys
      • Column
        • Record Citation
        • Column Citation
        • Column Data
        • Column Addition
      • Regulation
        • Signature
          • Signature
          • Open Signature
          • Signature Status
      • ❗Chemistry
      • ❗PubMed
      • ❗Device
      • ❗Integration
      • Advanced
        • Subtitle
        • Rating
        • Nested Fields
        • Storage
        • Storage Coordinates
    • Section Widgets
      • Office
        • Text
          • Plain Text
          • CKEditor Classic
          • CKEditor Balloon
          • CKEditor Document
          • CKEditor Restricted
          • CKEditor Classic Controlled
          • Code Editor
        • ❗Table
        • File
          • Files
          • File Preview
        • Google Drive
        • Drawing
        • G Suite
        • Microsoft Office
      • Data Display
        • Columns
          • Columns
          • Metadata
        • Sections
          • Section Display By Record
          • Section Display By ForeignKey
        • Record List
          • Record List
          • Record List by Column
          • Record List by ForeignKey
          • Record List by Query
      • ✅Regulation
        • Signers
        • ✅Audit Trail
          • ✅Activities
          • Versions
          • Visitors
      • Process Management
        • Flowchart
        • Steps
      • Diagram
        • Mermaid
        • Gantt Chart
        • Stage Flowchart
        • Relation Flowchart
      • Reference Manager
      • Biology
        • Molecular Biology Suite
          • Plasmid Editor
          • Open Vector Editor
        • Microplate
          • 6-Well Plate
          • 12-Well Plate
          • 24-Well Plate
          • 48-Well Plate
          • 96-Well Plate
          • 384-Well Plate
          • Flexible Well Plate
        • Sample Aliquoting
        • Assay
          • ELISA Standard Curve
          • ELISA Qualitative
          • Dose Response Curve
        • Protein
          • MolStar
          • RCSB Saguaro
        • Bioinformatics
          • QUiCKR Analysis
          • CRISPResso2
      • Chemistry
        • Chemical Formats
        • Chemical Drawing
        • Chemical Analysis
        • Chemical Reaction
      • Combination
        • Clinical Genomicist Workstation
      • Productivity
        • ✅Calendars
          • Calendar
          • Scheduling
        • Automation
          • Workflows
        • Ungrouped
          • Storage Map
        • Table of Contents
        • Communication
          • Email Template
          • Notifications
          • Comments
        • Barcode
        • ToDo
        • Timer
      • Report
        • Record Summary
          • Record Summary
        • Data Driven Charts
          • Chart By Category X
          • Chart By Numeric X
        • Custom Input Charts
          • Data Visualizer
    • Dashboard Widgets
      • Labii
      • Shortcut
        • Applications
        • Links
        • Filters
      • Productivity
        • Office
        • Flowchart
        • Section
        • Project Management
          • ✅Tasks
        • Summary
      • ✅Reports
        • Record Summary
          • Record Summary By Date
          • Record Summary By Tables
          • Record Summary By Projects
          • Record Summary By Users
        • Data Driven Charts
          • Chart By Category X
          • Chart By Numeric X
        • Matrix
          • Record Count By Filter
        • Audit
          • Storage Audit
      • Integration
        • Quickbooks
          • Quickbooks Customers
          • Quickbooks Accounts
          • Quickbooks Items
          • Quickbooks Invoices
  • API
    • Concepts
      • How to get token from Labii ELN & LIMS
      • How can I load Labii data from API into DataFrame
    • Methods
      • Authentication
      • Notification
      • Organization
      • Personnel
      • Team
      • Organization Widget
      • Statement
      • Backup
      • Project
      • Member
      • Table
      • Column
      • Filter
      • Row
      • Cell
      • Section
      • Activity
      • Version
      • Visitor
      • Workflow
      • Step
      • Widget
    • Variables
    • SDK
      • API Client (python)
      • API Client (javascript)
      • SDK (python)
      • SDK (javascript)
      • Examples
  • Applications
    • Electronic Lab Notebook
      • ELN for Research and Development
      • ELN for Production
      • ELN for ELISA Data Analysis
      • ELN for Dose Response Curve
    • Process Management
      • ❗Report creating process in diagnosis testing
      • ❗Email follow up process in CRM
      • ❗Management of the purchasing, approval, and ordering processes.
    • Sample Management
      • Sample Receiving
      • Track sample consumption
      • Aliquots Management
    • Equipment Management
      • ❗Equipment Scheduling
      • ❗Equipment Maintenance
    • Inventory Management
      • Barcode System
      • Stock Checkin and Checkout
      • Storage Management
      • ❗Purchase Management
    • Laboratory Information Management System
      • LIMS for Sample Testing
      • LIMS for NGS
    • Customer Relationship Management (CRM)
      • Quickbooks Integration
    • Document Management
    • Chemical Registration
    • Mouse Colony Management
    • Diagnostic Testing
    • Diabetes Tracker
    • Project Management
      • Task Management
      • How to manage research goals
    • Reference Management
    • Training Management
  • Support
    • Overview
    • Documentation
    • YouTube
    • Videos
    • Tickets
    • Chat with us
    • Schedule a meeting
    • Take a survey
    • Resources
    • Download
    • Blogs
    • FAQ
    • Other
      • Guidelines for Preparing Documents on Research Needs for Labii Configuration
Powered by GitBook
On this page
  • URL
  • Objects
  • Levels
  • Methods
  • Serializer
  • Status Codes
  • Errors
  • List view
  • Detail view
  • Example
  1. API

Concepts

The Labii API is a REST API that provides programmatic access to the Labii platform.

The Labii API is a REST API that provides programmatic access to the Labii platform. It supports all different calling methods, including GET, POST, PUT, and DELETE.

The Labii API is designed to be accessible and flexible, allowing developers to use the programming language and tools of their choice to interact with the Labii platform. The API is fully documented and provides detailed information about each of its endpoints, including the HTTP method, endpoint URL, required parameters, and expected response.

Some of the key features of the Labii API include:

  1. Resource-based architecture: The Labii API uses a resource-based architecture, which means that each endpoint represents a specific resource in the Labii platform, such as a project, experiment, or row.

  2. Authentication and authorization: The Labii API uses OAuth 2.0 for authentication and authorization, ensuring that only authorized users can access sensitive data.

  3. Pagination and filtering: The API provides support for pagination and filtering, allowing developers to retrieve specific subsets of data based on various criteria.

URL

The Labii API uses two types of URLs to represent two different views of an object:

  1. List of objects: {{base_url}}/{app}/{model}/list/{level}/{sid}/{serializer}/

  2. Detail of an object: {{base_url}}/{app}/{model}/detail/{sid}/

The base_url is set to https://www.labii.dev/ by default. If your organization has a dedicated server, you can use https://[your subdomain].labii.dev/ as the base_url.

The app parameter represents the name of the application, while the model parameter represents the name of the model. You can refer to the Labii documentation for more details on these parameters.

The level parameter represents the scope of records to retrieve. You can refer to the Levels section of the Labii documentation for more details on this parameter.

The sid parameter is a static and encrypted Labii object ID. It must match with the level parameter. For example, if level=organization, the sid parameter must be the SID of the organization.

Finally, the serializer parameter represents the scope of fields of the return data. There are three options available:

  • name: Returns only the SID and name of the object, which is very fast.

  • list: Returns selected fields of the objects, which is fast.

  • detail: Returns all fields of the objects, which is slow.

Objects

The Labii API provides various objects that represent different types of entities in the Labii platform, each with a set of methods for interacting with that entity. Below is a list of objects available in the Labii API along with their descriptions, the app they belong to, and their corresponding model:

Name
Description
App
Model

Organization

Represents the organization object

organizations

organization

Personnel

Represents a member of the organization

organizations

personnel

Team

Represents a team of the organization

organizations

team

Organization Widget

Represents the installed widgets in the organization

organizations

organizationwidget

Statement

Represents the monthly statement

organizations

statement

Backup

Represents the backup data

organizations

backup

Project

Represents the project object

projects

project

Project Member

Represents a project member or team

projects

member

Table

Represents the table object

tables

table

Column

Represents the columns of a table

tables

column

Row

Represents the rows of a table

tables

row

Cell

Represents the cells of a row

tables

cell

Section

Represents the sections of a row

tables

section

Version

Represents the versions of a row

tables

version

Filter

Represents the filters of a table

tables

filter

Workflow

Represents the workflow of a table

tables

workflow

Step

Represents the steps of a workflow

tables

step

Activity

Represents user activities

activities

activity

Widget

Represents the widget object

widgets

widget

Levels

Levels define the scope of records to retrieve. The level parameter is a required parameter for the list API. Labii uses the following levels:

  • organization: returns the results within the organization level.

  • user: returns the results for a particular user (deprecated).

  • project: returns the results for a project (deprecated).

Not all levels are available for all list APIs. If a wrong level is used, an HTTP_406_NOT_ACCEPTABLE error will be returned. The table below lists all the allowed levels for each API.

List API

level=organization

level=user

level=project

Organization List

Yes

Yes

-

Organization Member List

Yes

-

-

Team List

Yes

Yes

-

Organization Widget

Yes

-

-

Statement List

Yes

-

-

Backup List

Yes

-

-

Project List

Yes

Yes

-

Project Member List

Yes

-

Yes

Table List

Yes

-

-

Column List

Yes

-

-

Filter List

Yes

Yes

-

Row List

Yes

Yes

Yes

Cell List

Yes

-

-

Section List

Yes

-

-

Version List

Yes

-

-

Activity

Yes

Yes

-

Widget

*

-

-

Methods

The following documentation describes the methods used in the Labii API:

  • GET: This method is used to fetch one or more objects.

  • POST: This method is used to create an object.

  • PUT: This method is used to update an object.

  • PATCH: This method is used to partially update an object.

  • DELETE: This method is used to remove an object.

Different roles have different permissions in using the methods. There are five roles at the organization level:

  • Admin: The administrators

  • Member: The members of the organization

  • Alumni: The members who have left the organization

  • User: Other Labii users who do not belong to the organization

  • Anonymous: Unauthorized user

And 3 roles at the project level:

  • Project Admin: The administrator of a project

  • Project Edit: The members have edit permission at the project

  • Project View: The members have view permission at the project

API

GET

POST

PUT

PATCH

DELETE

Organization List

Admin, Member

Admin

-

-

-

Organization Detail

Admin, Member

-

-

Admin

-

Organization Member List

Admin, Member

Admin

-

-

-

Organization Member Detail

Admin, Member

-

-

Admin

-

Team List

Admin, Member

Admin

-

-

-

Team Detail

Admin, Member

-

-

Admin

Admin

Organization Widget List

Admin, Member

Admin

-

-

Admin

Organization Widget Detail

Admin, Member

-

-

-

Admin

Statement List

Admin

-

-

-

-

Statement Detail

Admin

-

-

-

-

Backup List

Admin

Admin

-

-

-

Backup Detail

Admin

-

-

-

-

Project List

Admin, Project Admin, Project Edit, Project View

Admin

-

-

-

Project Detail

Admin, Project Admin, Project Edit, Project View

-

-

Admin, Project Admin

-

Project Member List

Admin, Project Admin, Project Edit, Project View

Admin, Project Admin

-

-

-

Project Member Detail

Admin, Project Admin, Project Edit, Project View

-

-

Admin, Project Admin

Admin, Project Admin

Table List

Admin, Member

Admin

-

-

-

Table Detail

Admin, Member

-

-

Admin

-

Column List

Admin, Member

Admin

-

-

-

Column Detail

Admin, Member

-

-

Admin

-

Filter List

Admin, Member

Admin, Member

-

-

-

Filter Detail

Admin, Member

-

-

Admin, Member

Admin, Member

Row List

Admin, Project Admin, Project Edit, Project View

Project Admin, Project Edit

-

Project Admin, Project Edit

-

Row Detail

Admin, Project Admin, Project Edit, Project View

-

-

Project Admin, Project Edit

-

Cell List

Admin, Project Admin, Project Edit, Project View

Project Admin, Project Edit

-

-

-

Cell Detail

-

-

-

Project Admin, Project Edit

-

Section List

Admin, Project Admin, Project Edit, Project View

Project Admin, Project Edit

-

-

-

Section Detail

Admin, Project Admin, Project Edit, Project View

-

-

Project Admin, Project Edit

-

Version List

Admin, Project Admin, Project Edit, Project View

-

-

-

-

Version Detail

Admin, Project Admin, Project Edit, Project View

-

-

-

-

Activity List

Admin, Member

-

-

-

-

Activity Detail

-

-

-

-

-

Widget List

Admin, Member

-

-

-

-

Widget Detail

Admin, Member

-

-

-

-

Serializer

The Serializer in Labii API is used to convert the data from the database into a different format. Each Serializer in Labii represents a different field set to be returned. Labii API supports the following serializers:

  • name: This serializer returns the field of sid and name of a record.

  • list: This serializer returns some basic fields. The set of fields varies for different tables.

  • detail: This serializer returns a full set of fields.

Status Codes

Here is a list of status code used by Labii API:

  • HTTP_200_OK: return when API call successful

  • HTTP_201_CREATED: return when an object is created

  • HTTP_204_NO_CONTENT: return when an object is successfully deleted

  • HTTP_401_UNAUTHORIZED: return when the user is not authenticated

  • HTTP_403_FORBIDDEN: return when a user does not have permission

  • HTTP_406_NOT_ACCEPTABLE: return when parameter is not correct

  • HTTP_500_INTERNAL_SERVER_ERROR: return on internal errors

Errors

These are common errors for the list view and detail view.

List view

  • HTTP_401_UNAUTHORIZED - token is not valid

  • HTTP_403_FORBIDDEN - the user does not have permission to perform the action

  • HTTP_406_NOT_ACCEPTABLE - some parameter provided is not acceptable

    • Wrong level - the level provided is not valid or is not allowed

    • Wrong sid - the sid provided can be not decrypted, or does not match any records

    • Wrong field - Error: the field (xxx) is not allowed!

    • Wrong datatype - list, acceptable data is DICT. Please POST multiple times if you have more than one dataset.

Detail view

  • HTTP_401_UNAUTHORIZED - token is not valid

  • HTTP_403_FORBIDDEN - the user does not have permission to perform the action

  • HTTP_406_NOT_ACCEPTABLE - some parameter provided is not acceptable

    • Wrong sid - the sid provided can be not decrypted, or does not match any records

    • Wrong field - Error: the field (xxx) can not be updated!

Example

Get a list of records with curl:

curl -X get https://www.labii.dev/tables/rows/list/organization/xxx/list/ -H "Authorization: Token xxxx"

In Python:

import requests
headers = {
    "X-Forwarded-For": "batch",
    "Content-Type": "application/json",
    "Authorization": "Token %s" % token
}
requests.get(url="https://www.labii.dev/tables/rows/list/organization/xxx/list", headers=headers)
PreviousQuickbooks InvoicesNextHow to get token from Labii ELN & LIMS

Last updated 2 years ago