Skip to main content

Sciforge API: Prerequisites

Introduction

This is the first in a series of training modules, intended to familiarize developers with the setup and usage of a development environment for the SciForge API. This API is most often used with the Elab LIMS, and so training focuses primarily on that use case. The API is not intended to be limited in use to just Elab; other uses will require coding and configuration adjustments to meet the needs that the API will be put to.

The series of courses are meant to be used by LabLynx and Client developers alike. The primary difference is that development on client systems will typically take place in plugins. Expansion of the main SciForge codebase will be managed by LabLynx, however, pull requests may be made by client developers. Plugins may be coded by any authorized developer.

This particular course covers the development environment and assumptions. For LabLynx developers, the environment is pre-configured.

Video: Sciforge API_ Prerequisites.mp4 

Prerequisites

  • Environment
    • Linux environment with Docker, Git, and VS Code.
    • SQL Server, to host a development copy of the ELab LIMS database.
  • Data
    • Development copy of Elab LIMS database that includes a configured and known application key
      • Application keys will be demonstrated in a later section. These are used to authenticate API calls.
  • Technical Skills
    • Understanding of how to configure Elab development environments, or, at a minimum to find relevant objects in the database.
    • Git
    • Docker, including Docker Swarm
    • NodeJS
    • TypeScript
    • SQL
    • GraphQL
    • ORM usage (specifically sequelize)
    • There are a variety of publicly available libraries in use which will also not be covered in detail. Documentation is available online by the various entities that provide these libraries. Development environments have all source code, and so all libraries in use are clearly identified.
    • DNS configuration
    • Some network administration.
  • Repository access

Client Notes

  • Bitbucket account for repository access:
    • Please provide to LabLynx personnel email addresses of authorized accounts that have been created at Bitbucket by the developers that will be working on SciForge API plugins. LabLynx will then provide these accounts with appropriate permissions to the needed repositories.
    • LabLynx will provide the addresses of two repositories
  • Application Keys
    • These are used to authenticate API requests. The setup and usage of these will be covered in a later section. In order to create these, a working Elab system is needed, and should be made in the production (or, if not live, implementation) instance. Development on the SciForge API generally requires just the ELab database, and not a fully functional Elab development instance. LabLynx will provide copies of the database as needed, for development purposes. These development copies will need to have the authorization keys present to properly authenticate API calls.
  • WSDL keys
    • There are a couple of use cases that the SciForge API must get data from another API, due to libraries involved and differences in technology. This will be phased out, in time. Those use cases involve:
      • File handling
      • Obtaining reports from the report engine.
    • If it is possible that these will be used, coordinate with LabLynx to obtain a WSDL token that can be used in your development configuration.
    • Note that, in these particular use cases, a functioning instance of Elab is needed when making API calls. Unless developing new functionality, it may be appropriate to utilize the hosted test environment.
  • Database
    • Copies of the database for development purposes may be requested as needed, or alternatively, request that backups be automated and made available at a specified frequency.
  • DNS and general networking
    • The infrastructure that requires the use of DNS in your development environment will be discussed in later sections. The application, including development, is built to respond in the “sciforge.net” domain, though, which is a LabLynx owned domain. Web certificates are automatically issued via integration with Let’s Encrypt.
    • Please provide an IP or URL that can be used in an A or CNAME record to identify the development environment. LabLynx will add this to the sciforge.net domain.
      • A static IP public address will be added to a DNS A record, and is likely the simplest approach.
      • If the IP of the development box is dynamic, it will be necessary to setup dynamic DNS. In this case, a CNAME record will be used with the dynamic address provided.
      • Port 80 and port 443 on the development box should be available to the public internet. This is needed by Let’s Encrypt during the authentication portion of issuing automated web certificates.
    • Use of other domains is possible, with some tweaking, though the use of Let’s Encrypt for web certificates is assumed by the configuration provided.