Skip to content

KB article categories are read-only via v2 API (2.3.0) — set through legacy _categories #13

Description

@baraline

Summary

On GLPI 11 / High-Level API 2.3.0, a KB Article → Category link cannot be
written through the v2 API.

Details

  • KBArticle.categories[].id is readOnly: true in the contract, so POST/PATCH
    bodies containing categories are accepted but silently dropped (stored
    categories: []). Verified with four payload shapes + PATCH.
  • No category-link sub-resource exists under /Knowledgebase/*.
  • GLPI 11 stores KB categories as a many-to-many relationship exposed by legacy
    apirest.php as _categories; the old knowbaseitemcategories_id FK is gone.

Working write path

PUT {apirest.php}/KnowbaseItem/{id} with {"input": {"_categories": [ids]}},
which the v2 API then reads back correctly as categories=[{id, name}].

Client handling

set_kb_article_categories(...) + transparent fallback in create/update
(create raises without rollback on failure). Requires v1_base_url = legacy
apirest.php. Tracking issue to revisit if a future API version makes the field
writable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions