d0fc0114da66
Resolve the mablnet tunnel target for an owner + label
Resolves which mablnet tunnel to reach for a given label, and where (the mablnet WSS Router endpoint + whether a live agent is serving it). Two modes: Workspace-first (default, owner_type omitted). The cloud-test-run path: a test executor knows the run's workspace_id and the configured label but not the tunnel's owner. If a workspace-owned tunnel (workspace_id, label) exists it wins, and is returned even if no agent is currently live (so the caller fails the run rather than silently routing elsewhere); otherwise the workspace's company is resolved and a company-owned tunnel (company, label) is returned if one exists. 404 when neither exists. (Company tunnels carry no workspace_id, so the workspace agent listing cannot find them — this is why the endpoint encapsulates the resolution.) Owner-aware (owner_type set). Resolves the tunnel for an explicit owner — used by user-facing tooling (mabl link-agents test …) to reach a user (personal) or an explicit company tunnel. owner_id is required for company/workspace; for user it must be the caller's own id (a personal tunnel is private to its owner). Authorized like POST /link/mablnet/authorize/peer: a user owner only by that user, a company owner by a company admin/member, a workspace owner by a user who can modify it. 404 when no such tunnel exists. has_live_agent reports whether a ready Link Agent advertising mablnet_wss has heartbeated within the liveness window for the resolved owner — the caller's pre-run "is this tunnel serviceable" gate, mirroring the legacy Link Server check.
Query parameters
Workspace-first mode (owner_type omitted): the run's workspace — resolution starts here and the company is derived from it when no workspace tunnel exists. Required in this mode; ignored when owner_type is set.
Tunnel (Link Label) configured on the run's environment.
The kind of entity a mablnet tunnel is scoped to — its "owner". workspace is the classic scope: one tunnel per workspace. company scopes a single tunnel to an entire company, so every workspace under that company shares one mablnet tenant (and one Link Agent fleet) instead of needing a tunnel each. user is a personal tunnel scoped to a single user, private to that user — its egress is the user's own machine, used to route a cloud test run through it. All three are mablnet-only: legacy Link Tunnel is always workspace-scoped.
Owner-aware mode: the kind of owner to resolve the tunnel for. Omit for the default workspace-first resolution.
Owner-aware mode: the owner's id. Required when owner_type is company or workspace; for user it must be the caller's own user id (a personal tunnel is private to its owner).
Response
The resolved tunnel target.
Example response
{
"carrier_endpoints": {
"mablnet_wss": "mabl-wss.link.mabl.com",
"mablnet_quic": "mabl-quic.link.mabl.com"
},
"allowed_protocols": [
"mablnet_quic",
"mablnet_wss"
],
"carrier_connect_timeouts": {
"mablnet_quic": 8000,
"mablnet_wss": 45000
},
"client_pool_size": 2
}