LabKey's JavaScript client library makes it easy to write custom pages and utilities on LabKey Server. A few examples of ways you might use the JavaScript API to access and/or update data:
  • Add JavaScript to a LabKey HTML page to create a custom renderer for your data, transforming and presenting the data to match your vision.
  • Upload an externally-authored HTML page that uses rich UI elements such as editable grids, dynamically trees, and special purpose data entry controls for LabKey Server tables.
  • Create a series of HTML/JavaScript pages that provide a custom workflow packaged as a module.

JavaScript API

The JavaScript API has evolved and expanded to provide new functionality related to endpoints and Domain operations. The latest version of the TypeScript-based API is available here:

Original JS API

In addition, the original JS API can still be used for the operations not included in the newer version, including classes that concern the DOM and user interface. Some examples are:

To access any original API classes from a TypeScript client, add one of the following at the top of a .tsx file (just under the imports), then use the LABKEY namespace as usual.
  • If using TypeScript, use:
    declare const LABKEY: any;
  • Otherwise, use:
    declare const LABKEY;

Topics


Premium Resources Available

Subscribers to premium editions of LabKey Server can learn more with the example code in these topics:


Learn more about premium editions

Additional Resources:

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all