[Bug]: type mismatch and undocumented fields in the API
Bug Summary
API documentation shows string-typed values, but the JSON-RPC API returns native ints/bools (and several undocumented fields)
Description
API documentation shows string-typed values, but the JSON-RPC API returns native ints/bools (and several undocumented fields)
Summary
The response examples in the API reference at https://docs.kanboard.org/v1/api/ show nearly every value as a string ("id": "1", "is_active": "1", "date_creation": "1409963206"), but a current Kanboard returns native JSON types ("id": 1, "is_active": true, "date_creation": 1409963206). Some responses also contain fields that are not in the documentation, and the documented "Result on failure" values do not match what is returned. Clients written against the documentation (typed languages such as Go, Java, C#, or strict JSON schema validation) break on either the old or the new format, and there is no ChangeLog entry describing the change.
Environment
- Kanboard v1.2.54 (
getVersionreturns"v1.2.54") - Access via
POST /jsonrpc.phpwith the application API token (userjsonrpc) - Observed with an earlier Kanboard version on the same instance: the same procedures returned strings, as in the documentation, so the behaviour changed between releases
Steps to Reproduce
curl -s -u "jsonrpc:$KANBOARD_API_TOKEN" -H 'Content-Type: application/json' \
https://kanboard.example.com/jsonrpc.php \
-d '{"jsonrpc":"2.0","method":"getTask","id":1,"params":{"task_id":1}}'Compare the result with the "Response example" under getTask in content/en/v1/api/task_procedures.md.
Expected Behavior
Observed vs documented
getTask (same for getAllTasks, getTaskByReference)
| Field | Documented | Returned by v1.2.54 |
|---|---|---|
id, project_id, column_id, owner_id, creator_id, swimlane_id, category_id, position |
"1" (string) |
1 (int) |
date_creation, date_modification, date_moved, date_due, date_started |
"1409963206" / "0" / null |
1409963206 / 0 (int) |
is_active |
"1" |
true (bool) |
score, time_spent, time_estimated, recurrence_* |
"0" |
0 (number) |
priority, external_provider, external_uri, owner_gp, owner_ms |
not documented | present (0, null, null, 0, 0) |
getAllComments
| Field | Documented | Returned |
|---|---|---|
id, task_id, user_id, date_creation |
strings | ints |
date_modification, visibility, email, avatar_path |
not documented | present |
getAllTaskFiles
| Field | Documented | Returned |
|---|---|---|
id, task_id, user_id, date, size |
strings | ints |
is_image |
"0" |
true / false (bool) |
etag |
not documented | present |
getAllTaskLinks
| Field | Documented | Returned |
|---|---|---|
id, task_id, project_id, task_assignee_id |
strings | ints |
is_active |
"1" |
bool |
task_time_spent |
"0" |
number (e.g. 2389.89) |
column_id, color_id, date_completed, date_started, date_due, project_name |
not documented | present |
getAllExternalTaskLinks: id, task_id, creator_id, date_creation, date_modification are ints, not strings.
getProjectById / getAllProjects: id, last_modified are ints; is_active, is_public, is_private, per_swimlane_task_limits, enable_global_tags are bools; start_date, end_date, owner_id, priority_default, priority_start, priority_end, email, predefined_email_subjects, task_limit, enable_global_tags are not documented; the documented url.calendar entry is not returned (only board and list).
getColumns / getColumn: description and hide_in_dashboard are not documented. getSwimlane: task_limit is not documented. getUser: most returned fields (timezone, language, disable_login_form, twofactor_activated, notifications_filter, nb_failed_login, lock_expiration_date, gitlab_id, is_active, avatar_path, filter, oauth2_user_id, theme) are not documented.
getTaskMetadata: documented as an array containing one object ("result": [ { "metaKey1": "metaValue1" } ]), actually returns the object directly ("result": {} for a task without metadata).
"Result on failure": getAllComments and getAllTaskFiles are documented to return false on failure, but for a non-existent task id they return []. getTask correctly returns null as documented.
Expected
Either of these would resolve it:
- Update the response examples in the documentation to the types the current code returns, and add the undocumented fields.
- Mention the type change in the ChangeLog (which release introduced it), so that API client authors know that responses differ by Kanboard version.
Ideally both. Documenting the intended types explicitly (for example "integer", "boolean", "unix timestamp or 0") rather than only via examples would also help.
Actual Behavior
see above (it is easier to compare them in a tabular format)
Version
v1.2.54
Database
PostgreSQL 17
PHP Version
No response
Browser
No response
Operating System
No response
Relevant Logs or Error Output
Additional Context
- I could not find a ChangeLog entry for the change between the string-typed and the native-typed responses, nor an existing issue about it.
- The documentation source files involved are under
content/en/v1/api/in thekanboard/documentationrepository (last touched in commit 8a1a35c, April 2026, which only fixed typos). - I am happy to submit a documentation PR with corrected examples if that is welcome; I have real responses for all procedures listed above.
Checklist
- I have searched existing issues to ensure this bug hasn't been reported before.
- I verified that the problem is not caused by a plugin. Please report the issue to the plugin author if applicable.
Source: kanboard/kanboard