Skip to main content

Sciforge API: Managing Application Keys

An Application Key (or AppKey) is used to authenticate API requests. This document shows how you can generate AppKeys in Elab to access the Sciforge API.

Video: App Key Management

Requirements

First the ELab Appkey functionality will need to be present in the ELlab system you are working with.

Additionally, your SciForge API will need to be up installed and configured to work with ELab. Specifically, <sciforgeURL> and <sciforgeSecret> need to be set in the ELab LimsInfo.xml configuration file.

Generating the AppKey from Elab

Login to the ELb Instance that the SciForge API is used with. Your account will need a profile with permissions to access the screens discussed below.

To generate an Appkey there are two screens that may be used. The names used below are “off-the-shelf,” however, as ELab is so configurable, these may be relabeled or rearranged in your copy of ELab, or in some cases, may need to be added to the menu.

For production purposes, a service account should normally be created. Application Keys are tied to accounts. When tied to a user account, access to the API would be lost if the account were to be disabled.

AppKey Management

The first can be found in the root navigation menu titled “AppKey Management”

4.png

This screen will generate an AppKey specific to the account you are currently logged in on.

Click the New button and you will be taken to an edit screen:

5.png

Enter a name for your Application Key. This name needs to be unique, and you will be prompted to use a unique name if it is not.

Click Save and a modal dialogue will popup providing you with your application key. You will need to store this somewhere for future use, as once you leave the modal window you will NOT be able to retrieve the Application Key a second time. If you lose your Application Key, you will need to Revoke (see button in screenshot above when clicking on an existing AppKey in the list menu) the AppKey and create a new one.

AppKeys (Admin)

The second screen can be found under System → Security and is titled “AppKeys (Admin)”

This is an Administration screen that will allow an Admin to see all of the existing AppKeys for all users, generate new AppKeys for any user, and revoke any appkeys from any user.

6.png

The process for Revoking keys is the same here as it is in the other screen. Click on an existing AppKey and then click the Revoke button in the edit pain.

Generating an AppKey has one additional step. You will need to select the user you are creating the AppKey for while on the edit page.

7.png

To do this click the “Assigned To: “ Selection and a User look up will be provided to you. Select the User you would like to generate the AppKey for, enter the Name of the AppKey and click Save.

It is worth noting now, The Application Key Name must be unique, but it must be Unique in combination with the UserID. Two different users can have the same Application Key Name. Just as in the other screen, if you do not provide a unique combination of User and AppKey Name, you will be prompted to do so.