Files
dealplustech/dealplustech-astro/API_TEST_RESULTS.md
Kunthawat Greethong ede8e32591 feat: Fix product tables and responsive fonts
- Add product detail page ([slug].astro) with table rendering
- Display productTables from site-config.ts on product pages
- Add responsive font scaling for large screens (1280px+)
- Base font scales from 16px to 24px on 4K displays
- All text elements use responsive sizing (md/lg/xl breakpoints)
- Tables styled with green headers and alternating rows
- Add comprehensive documentation (FIXES_SUMMARY.md)

Fixes:
- Product specification tables now visible on product pages
- Font too small on large screens - now responsive
2026-03-02 12:22:13 +07:00

4.2 KiB

🔬 Easypanel API Testing Results

What Works

1. Authentication

curl -H "Authorization: Bearer TOKEN" \
  http://110.164.146.46:3000/api/trpc/setup.getStatus
# ✅ Returns: {"result":{"data":{"json":{"isComplete":true}}}}

2. List Projects

curl -H "Authorization: Bearer TOKEN" \
  http://110.164.146.46:3000/api/trpc/projects.listProjectsAndServices
# ✅ Returns project list including "customerwebsite"

3. Inspect Service

curl -H "Authorization: Bearer TOKEN" \
  http://110.164.146.46:3000/api/trpc/services.app.inspectService
# ✅ Works when service exists

What Fails - Service Creation

Endpoint

POST /api/trpc/services.app.createService

Schema (from OpenAPI)

{
  "input": {
    "json": {
      "projectName": "customerwebsite",
      "serviceName": "my-app",
      "source": {
        "type": "image" | "github",
        // For "image":
        "image": "nginx:alpine",
        "username": "...",
        "password": "...",
        // For "github":
        "owner": "...",
        "repo": "...",
        "ref": "main",
        "path": "..."
      }
    }
  }
}

Attempts & Errors

Attempt 1: Basic Image

{
  "input": {
    "json": {
      "projectName": "customerwebsite",
      "serviceName": "test",
      "source": {
        "type": "image",
        "image": "nginx:alpine",
        "port": 80
      }
    }
  }
}

Result: 500 Error

{
  "error": {
    "json": {
      "message": "[{\"code\":\"invalid_type\",\"expected\":\"object\",\"received\":\"undefined\",\"path\":[],\"message\":\"Required\"}]"
    }
  }
}

Attempt 2: With Git Source

{
  "input": {
    "json": {
      "projectName": "customerwebsite",
      "serviceName": "test-git",
      "source": {
        "type": "git",
        "repository": "http://...",
        "branch": "main"
      }
    }
  }
}

Result: Same "Required" error

Attempt 3: Using project instead of projectName

{
  "input": {
    "json": {
      "project": "customerwebsite",
      "name": "test"
    }
  }
}

Result: Same error


🔍 Analysis

The Zod validation error "expected":"object","received":"undefined","path":[] suggests:

  1. Missing required field at root level
  2. Schema mismatch - the API expects additional fields not in OpenAPI spec
  3. Possible tRPC format issue - Easypanel might use a different input format

💡 Hypothesis

Easypanel's createService endpoint might require:

Option A: Additional Required Fields

{
  "input": {
    "json": {
      "projectName": "...",
      "serviceName": "...",
      "source": {...},
      // Missing required fields:
      "environmentVariables": [],
      "domains": [],
      "ports": [],
      "mounts": []
    }
  }
}

Option B: Different tRPC Format

{
  "type": "query",
  "input": {...}
}

Option C: Requires Project ID (not name)

{
  "input": {
    "json": {
      "project": "cmkw22b00000007tu4gim48q9",  // Actual ID
      "name": "test"
    }
  }
}

📋 Next Steps to Debug

1. Capture Browser Network Traffic

  1. Open Easypanel dashboard
  2. Open DevTools → Network tab
  3. Create a service manually
  4. Inspect the exact API request
  5. Copy request payload

2. Test with cURL

Use the exact payload from browser

3. Alternative: Use Easypanel CLI (if exists)

Check if Easypanel provides official CLI

4. Contact Easypanel Support

Ask for correct API schema for services.app.createService


🎯 Current Recommendation

Until API is figured out, use manual creation:

  1. Create service via dashboard (2 minutes)
  2. Copy service ID
  3. Register with skill: ./deploy.sh register SERVICE_ID
  4. Future updates: Automated via ./deploy.sh update

This is still 80% automated!


📞 Need Your Help

Can you:

  1. Open browser DevTools when creating service in Easypanel
  2. Copy the exact API request payload
  3. Share it so I can update the skill?

Or if you know the correct schema, let me know!


Status: ⚠️ API schema unclear
Workaround: Manual creation + automated updates
Automation Level: 80% (will be 100% with correct schema)