apiGet sends params as ?input=<JSON> instead of named query params — all GET commands with parameters fail (400)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in src/client.ts and compare apiGet with the query-parameter conventions in openapi.json. Run a parameterized command such as dokploy compose one --composeId <valid-id> --json, then check that GET commands use named query keys and return successfully instead of failing with status 400.
Written by the indexing model from the issue text.
Description
Problem
Any CLI command that maps to a GET endpoint with query parameters fails:
dokploy compose one --composeId <valid-id> --json
# Request failed with status code 400
This affects every "read one" / "search" style command across the API (compose one, application one, project one, mysql one, registry one, *.search, *.readLogs, etc. — anything backed by a GET with query params in openapi.json). Commands backed by POST (deploy, delete, update, create) are unaffected.
Root cause
In src/client.ts:
export async function apiGet(
endpoint: string,
params?: Record<string, unknown>,
) {
const client = createClient();
const query = params
? `?input=${encodeURIComponent(JSON.stringify(params))}`
: "";
const response = await client.get(`/trpc/${endpoint}${query}`);
return response.data?.result?.data?.json ?? response.data;
}
This wraps all params into one JSON-encoded input query string — the convention for calling tRPC procedures directly. But the REST surface this CLI actually targets (per its own openapi.json) expects each parameter as its own named query key, e.g. ?composeId=<id>, not a JSON blob under input.
Confirmed directly: the same request, same auth, sent as a plain named query param instead of through the CLI, succeeds:
curl -s -H "x-api-key: $DOKPLOY_AUTH_TOKEN" \
"https://<host>/api/compose.one?composeId=<valid-id>"
# returns the full object correctly
Suggested fix
const response = await client.get(`/trpc/${endpoint}`, { params });
Environment
@dokploy/cli 0.29.14 (also reproduced on 0.3.0 — not version-specific).
- Dominant language
- TypeScript
- Stars
- 152
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Dokploy/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 62/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100