Skip to main content

Connecting L7|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. In it, the left-hand Configuration must display JSON resembling the structure below.

Only the hostlocation_id, and name are required.

To connect to a remote Hub:

  1. Go to L7 Configuration.

  2. Select New Configuration.

  3. Name the new configuration hub

  4. Switch to "code view".

  5. Add the following code to the Configuration panel:

Note

A placeholder hub configuration already exists in L7|ESP v3.4.

{
  "filters": {
    "hub": [
      {
        "filterType": "status",
        "contentName": "someStatus"
      }
    ],
    "collections": []
  },
  "locations": [
    {
      "description": "remote Hub 1 description",
      "host": "remote Hub 1 url",
      "location_id": 1,
      "name": "remote Hub 1 name"
    },
    {
      "description": "remote Hub 2 description",
      "host": "remote Hub 2 url",
      "location_id": 2,
      "name": "remote Hub 2 name"
    }
  ],
  "publish_configurations": [
    "configuration 1",
    "configuration 2", 
    "configuration 3"
  ],
  "publish_queries": [
    "query_1.yaml", 
    "query_2.yaml",
    "query_3.yaml"
  ],
  "allow_install_non_approved_bundle": false
}

Note

Content can be filtered in the Hub and Collections tabs by type, review status (Hub only), status, and tags.

Configurations and queries must be explicitly whitelisted.

To generate the remote instance's API key:

  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 local L7|ESP instance.

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

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

Note

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