Skip to main content

Connecting L7|HUBs

Connecting to remote Hubs

Remote Hubs can be connected to using the remote instance's URL and API key. In L7 Configuration, a configuration explicitly named hub must be used. A placeholder hub configuration already exists for you to modify. The left-hand Configuration must display JSON resembling the structure outlined below.

Step 1: Setup the Configuration (left panel)

  1. Go to L7 Configuration

  2. Select the hub configuration file

  3. Switch to Code view

  4. Enter the remote host URL

  5. Enter a name for the remote Hub. This will be displayed in L7|HUB's navigational dropdown, where users select either their "local" Hub or the name of the remote Hub they wish to connect to.

  6. Optionally enter a description about the remote Hub

  7. Enter a location_id, this should be a number not equal to 99 and will be referenced when setting up the configuration file secrets

  8. Optionally enter an esp_version and remote_user

    Note

    After connecting to the remote Hub, esp_version and remote_user will automatically be updated.

{
  "filters": {
    "hub": [
      {
        "filterType": "status",
        "contentName": "someStatus"
      }
    ],
    "collections": []
  },
  "locations": [
    {
      "host": "example.com",
      "name": "Hub Dropdown Name",
      "description": "Description of remote Hub goes here. 'location_id' 99 is ignored. 'location_id' value must equal the secrets location number. The secrets 'api_key' must be attained from the remote Hub User Settings.",
      "esp_version": "UNKNOWN",
      "location_id": 99,
      "remote_user": "UNKOWN_USER"
    },
    {
      "host": "example2.com",
      "name": "Hub Dropdown Name 2",
      "description": "Description...",
      "esp_version": "UNKNOWN",
      "location_id": 2,
      "remote_user": "UNKOWN_USER"
    }
  ],
  "publish_queries": [
    "my_custom_query.yaml",
    "plasmid_editor_query.yaml"
  ],
  "locations_defaults": [
    {
      "host": "example.com",
      "name": "Hub Dropdown Name",
      "description": "Description...",
      "location_id": 99
    }
  ],
  "publish_configurations": [
    "a_configuration",
    "Plasmid Editor"
  ],
  "allow_install_non_approved_bundle": "all"
}

Tip

Additional things to note about the hub configuration file:

  • Apply filters to the content in the Hub and Collections tabs by type, review status (Hub only), status, and tags.

  • Configurations and queries must be explicitly whitelisted.

  • Control the installation of Hub bundles based on their review status

Step 2: Set up the Secrets (right panel)

This step requires you to generate the remote instance's API key:

Note

API keys only need to be generated once for each remote Hub.

  1. Login to the remote L7|ESP instance.

  2. Select your username in the upper right-hand corner → User Settings → Security → Generate API Key.

  3. Return to the hub configuration file of the local L7|ESP instance.

  4. Add the following code to the Secrets panel in the hub configuration:

  5. Update the Secret's location number(s) to match the location_id defined in the configuration

  6. Enter the generated remote instance's API key in the corresponding api_key

{
  "locations": {
    "99": {
      "api_key": "remote Hub 1 API key"
    },
    "2": {
      "api_key": "remote Hub 2 API key"
    }
  }
}