Get Virtual Hubs

This endpoint retrieves a list of virtual hubs associated with a given organisation. The response provides key details for each virtual hub, including its unique ID, name, description, creation and update timestamps, and organisation ID. Each virtual hub contains information about its connected ports, specifying the hub ID and the corresponding port ID for each connection. The response offers a structured overview of virtual hubs within the organisation, detailing how they are mapped to physical hubs and their respective ports. This allows for better visibility into hub configurations, port assignments, and overall network connectivity. The metadata section includes the total number of virtual hubs retrieved.

To enhance flexibility, this endpoint supports additional parameters to limit the number of results returned, ensuring efficient data handling. A continuation token can also be used to paginate through large datasets, allowing you to retrieve workflows in manageable chunks for improved performance and scalability.

Syntax: see 'CCall Structure

Type = 'GET'

'https://connect.cambrionix.com/api/hardware/v1/virtual-hubs?token=token&limit=return-number'

Variable Description
token Continuation token
return-number Number of records to return
Returns:

{ "created": { "time": time }, "updated": { "time": time }, "id": "virtual-hub-id", "organization": { "id": "organisation-id" }, "name": "virtual-hub-name", "description": "virtual-hub-description", "ports": { "virtual-hub-port": { "hub": { "id": "hub-serial" }, "port": { "id": hub-port } } } "_metadata": { "total": total-entries }

Output Description
time The hub time, shown as an integer in ms
virtual-hub-id This is the id of the virtual hub as a unique 128-bit number
organisation-id This is the id of the organisation as a unique 128-bit number
virtual-hub-name This is the name of the virtual hub
virtual-hub-description This is the description of the virtual hub
virtual-hub-port This is theport number of the virtual hub
hub-serial This is the serial number of the hub
hub-port This is the port number of the hub
total-entries This is the total amount of entries returned
Example
curl -X 'GET' \
  'https://connect.cambrionix.com/api/hardware/v1/virtual-hubs?limit=10' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI5l2QdQQA'
Returns
{
  "result": [
    {
      "created": {
        "time": 1724248462488
      },
      "updated": {
        "time": 1724248462488
      },
      "id": "00f7543a-d6ef-4059-8691-9ce54a9f12e1",
      "organization": {
        "id": "dafc70d5-a4c8-42a3-ad8d-a8ccb5fa313f"
      },
      "name": "hub 1",
      "description": "aaa",
      "ports": {
        "1": {
          "hub": {
            "id": "0000006567CDF436"
          },
          "port": {
            "id": 2
          }
        },
        "2": {
          "hub": {
            "id": "0000006567CDF436"
          },
          "port": {
            "id": 5
          }
        },
        "3": {
          "hub": {
            "id": "0000006567CDF436"
          },
          "port": {
            "id": 8
          }
        },
        "4": {
          "hub": {
            "id": "DJ00B475"
          },
          "port": {
            "id": 1
          }
        }
      }
    },
    {
      "created": {
        "time": 1724248527682
      },
      "updated": {
        "time": 1724248527682
      },
      "id": "b0f02d88-0a50-4568-b58b-94b1288e83cd",
      "organization": {
        "id": "dafc70d5-a4c8-42a3-ad8d-a8ccb5fa313f"
      },
      "name": "hub 2",
      "description": "aac",
      "ports": {
        "1": {
          "hub": {
            "id": "0000006567CDF436"
          },
          "port": {
            "id": 15
          }
        },
        "2": {
          "hub": {
            "id": "0000006567CDF436"
          },
          "port": {
            "id": 12
          }
        }
      }
    }
  ],
  "_metadata": {
    "total": 2
  }
}
Errors

If there is an error in the API method then JSON-RPC Error Object a will be returned