Skip to main content
← Back to list
01Issue
BugClosedSwamp Club
AssigneesNone

user.get returns 404 — wrong API URL path

Opened by swampadmin · 1/20/2025

Description

The @john/tailscale-user model's get method returns 404 for valid user IDs. The error message reveals it's using the wrong URL path.

Steps to Reproduce

# List users first (works fine)
swamp model method run my-users list --json
# Returns users with IDs like "uCnKdV6CNTRL"

# Get a specific user (fails)
swamp model method run my-users get --input '{"userId": "uCnKdV6CNTRL"}' --json
# Output: {"error": "Tailscale API error 404 GET /api/v2/tailnet/-/users/uCnKdV6CNTRL: 404 page not found"}

Expected Behavior

The correct Tailscale API endpoint for getting a user is GET /api/v2/users/{userId}, not GET /api/v2/tailnet/-/users/{userId}. The method should use the non-tailnet-scoped URL path.

Environment

  • swamp version: 20260227.225234.0-sha.2b2b28be
  • Extension: @john/tailscale (version 2026.02.28.2)
  • OS: macOS (Darwin 22.6.0)

Summary

The user.get method constructs its API URL using the tailnet-scoped path pattern (/api/v2/tailnet/{tailnet}/users/{userId}) but the Tailscale API only supports the direct path (/api/v2/users/{userId}) for individual user lookups. The fix would be to update the URL construction in the @john/tailscale-user model's get method to use the correct non-tailnet-scoped endpoint.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.