Skip to content

[FEATURE] Add support for content properties (get, set, update, delete) #37

@mshddev

Description

@mshddev

Is your feature request related to a problem? Please describe.

Currently, confluence-cli has no way to manage Confluence content properties — the key-value metadata stored against pages and other content. Users who rely on content properties for automation, app integrations, or CQL-based search cannot get, set, update, or delete them through this CLI.

Describe the solution you'd like

Add a set of commands to manage content properties on a Confluence page (or other content types). The suggested commands:

  • confluence property-list <pageId> — List all content properties for a page
  • confluence property-get <pageId> <key> — Get a specific content property by key
  • confluence property-set <pageId> <key> --value '<json>' — Create or update a content property (auto-increments the version number)
  • confluence property-delete <pageId> <key> — Delete a content property

Output should default to formatted JSON, with --format json for raw/piped output.

Describe alternatives you've considered

  • Using curl directly against the Confluence REST API (/rest/api/content/{id}/property), but this requires manual authentication handling, version tracking, and is error-prone.
  • Using the Confluence v2 REST API's Content Properties endpoints, but this CLI currently uses v1.

Use case

  • Automation & CI/CD: Store build metadata, deployment status, or sync state on pages as content properties, then query them via CQL.
  • App development: Confluence apps (Connect/Forge) store structured data as content properties — being able to inspect and manage these from the CLI is invaluable for debugging and development.
  • Bulk operations: Scripting property updates across many pages (e.g., tagging pages with metadata, clearing stale properties).
  • CQL search: Content properties can be indexed and searched via CQL. The ability to set them from the CLI enables richer search workflows.

Additional context

The Confluence v1 REST API already supports content properties at these endpoints:

  • GET /rest/api/content/{id}/property — list all properties
  • GET /rest/api/content/{id}/property/{key} — get a single property
  • PUT /rest/api/content/{id}/property/{key} — create or update (requires key, version.number, value in body)
  • DELETE /rest/api/content/{id}/property/{key} — delete a property

Content properties can also be fetched as an expansion: ?expand=metadata.properties.<key>

Reference: Confluence Entity Properties documentation

Implementation suggestions

  1. Add a new src/commands/property.js (or similar) module with subcommands for list, get, set, and delete.
  2. For property-set, automatically handle versioning: fetch the current version first (or start at 1 for new properties), then increment when updating — so users don't have to manage version numbers manually.
  3. Accept --value as a JSON string; validate it before sending to the API.
  4. Support --file flag for property-set to read the JSON value from a file (useful for large or complex property values).
  5. Support page URLs in addition to page IDs, consistent with existing commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions