{"skill":{"slug":"openkm-rest","displayName":"OpenKM Document Management","summary":"OpenKM Document Management via REST API (folders, documents, metadata, versioning, search, workflows)","description":"---\nname: openkm-rest\ndescription: OpenKM Document Management via REST API (folders, documents, metadata, versioning, search, workflows)\nmetadata:\n  openclaw:\n    emoji: \"📁\"\n    requires:\n      bins: [\"python\"]\n      env:\n        - OPENKM_BASE_URL\n        - OPENKM_USERNAME\n        - OPENKM_PASSWORD\n    primaryEnv: OPENKM_BASE_URL\nuser-invocable: true\ndisable-model-invocation: false\n---\n\n# OpenKM REST Skill\n\nThis skill provides a **local CLI** that accesses OpenKM **exclusively via REST**\n(no SOAP, no CMIS).\n\nThe agent uses **shell calls** to `openkm_cli.py`.\n\n## Environment Variables (Required)\n\n```bash\nOPENKM_BASE_URL=https://openkm.example.com   # WITHOUT /OpenKM\nOPENKM_USERNAME=okm_admin\nOPENKM_PASSWORD=secret\n```\n\n## Folder Operations\n\n### List folder contents\n```bash\npython3 openkm_cli.py list --folder-path /okm:root\n```\n\n### Create folder structure\nCreates parent folders if they don't exist:\n```bash\npython3 openkm_cli.py ensure-structure --parts Folder1 Subfolder\n```\n\n## Document Operations\n\n### Upload document\n```bash\npython3 openkm_cli.py upload --okm-path /okm:root/Folder/file.pdf --local-path /path/file.pdf\n```\n\n### Download document\n```bash\npython3 openkm_cli.py download --doc-id <uuid> --local-path /path/file.pdf\n```\n\n### Move document\nMove a document to another folder (using folder UUID as target):\n```bash\npython3 openkm_cli.py move --doc-id <doc-uuid> --target-path <folder-uuid>\n```\n\n### Rename document\n```bash\npython3 openkm_cli.py rename --doc-id <uuid> --new-name new_filename.pdf\n```\n\n### Delete document\n```bash\npython3 openkm_cli.py delete --doc-id <uuid>\n```\n\n## Metadata & Organization\n\n### Get document properties\nShows title, description, keywords, categories, and other metadata:\n```bash\npython3 openkm_cli.py properties --doc-id <uuid>\n```\n\n### Set title and description\n```bash\npython3 openkm_cli.py set-properties --doc-id <uuid> --title \"My Title\" --description \"My description\"\n```\n\n### Add keyword\n```bash\npython3 openkm_cli.py add-keyword --doc-id <uuid> --keyword \"Invoice\"\n```\n\n### Remove keyword\n```bash\npython3 openkm_cli.py remove-keyword --doc-id <uuid> --keyword \"Invoice\"\n```\n\n### Add category\nCategory ID can be a UUID or path (e.g., `/okm:categories/Finance`):\n```bash\npython3 openkm_cli.py add-category --doc-id <uuid> --category-id <category-uuid-or-path>\n```\n\n### Remove category\n```bash\npython3 openkm_cli.py remove-category --doc-id <uuid> --category-id <category-uuid-or-path>\n```\n\n## Versioning\n\n### Get version history\n```bash\npython3 openkm_cli.py versions --doc-id <uuid>\n```\n\n### Download specific version\n```bash\npython3 openkm_cli.py download-version --doc-id <uuid> --version 1.0 --local-path /path/file_v1.pdf\n```\n\n### Restore version\nRestores document to a previous version:\n```bash\npython3 openkm_cli.py restore-version --doc-id <uuid> --version 1.0\n```\n\n## Search\n\n### Search by content (full-text)\n```bash\npython3 openkm_cli.py search-content --content \"invoice hosting\"\n```\n\n### Search by filename\n```bash\npython3 openkm_cli.py search-name --name \"hetzner\"\n```\n\n### Search by keywords\n```bash\npython3 openkm_cli.py search-keywords --keywords \"Invoice,Hosting\"\n```\n\n### General search with filters\n```bash\npython3 openkm_cli.py search --content \"server\" --author \"john.doe\" --path \"/okm:root\"\n```\n\n## Workflows\n\n> **Note:** Workflow features require workflows to be configured in OpenKM. \n> If workflows are not enabled, these commands will return 404.\n\n### List available workflows\n```bash\npython3 openkm_cli.py workflows\npython3 openkm_cli.py workflows --name \"approval\"\n```\n\n### Start a workflow\n```bash\npython3 openkm_cli.py start-workflow --workflow-uuid <workflow-uuid> --doc-id <doc-uuid>\n```\n\n### List tasks\n```bash\n# Tasks for a document\npython3 openkm_cli.py tasks --doc-id <uuid>\n\n# Tasks for an actor\npython3 openkm_cli.py tasks --actor-id john.doe\n```\n\n### Complete a task\n```bash\npython3 openkm_cli.py complete-task --task-id <task-id> --transition \"approve\"\n```\n\n### Add comment to task\n```bash\npython3 openkm_cli.py comment-task --task-id <task-id> --message \"Review complete\"\n```\n\n### Assign task to actor\n```bash\npython3 openkm_cli.py assign-task --task-id <task-id> --actor-id john.doe\n```\n\n## Notes\n\n- The API expects `Content-Type: application/xml` for POST requests with path as body\n- Paths must be URL-encoded when passed as query parameters\n- The `fldId`, `docId`, `dstId`, `nodeId`, `catId` parameters accept either UUIDs or paths (e.g., `/okm:root/Folder`)\n- For move operations, the `target-path` should be the UUID of the destination folder\n- For rename operations, provide only the new filename (not full path)\n- Keywords are free-form text tags; categories are predefined in OpenKM\n- Version names are typically numbers like `1.0`, `1.1`, `2.0`, etc.\n- Search results include a relevance score\n- Workflow features require proper workflow configuration in OpenKM\n\n## API Reference\n\nThe skill uses the OpenKM 6.3 REST API endpoints:\n\n**Folders:**\n- `GET /folder/getChildren` - List folder contents\n- `POST /folder/createSimple` - Create folder\n\n**Documents:**\n- `POST /document/createSimple` - Upload document\n- `GET /document/getContent` - Download document\n- `GET /document/getProperties` - Get document metadata\n- `PUT /document/setProperties` - Update title/description\n- `PUT /document/move` - Move document\n- `PUT /document/rename` - Rename document\n- `DELETE /document/delete` - Delete document\n\n**Versioning:**\n- `GET /document/getVersionHistory` - Get version history\n- `PUT /document/restoreVersion` - Restore to version\n- `GET /document/getContentByVersion` - Download specific version\n\n**Properties/Metadata:**\n- `POST /property/addKeyword` - Add keyword\n- `DELETE /property/removeKeyword` - Remove keyword\n- `POST /property/addCategory` - Add category\n- `DELETE /property/removeCategory` - Remove category\n\n**Search:**\n- `GET /search/find` - General search with filters\n- `GET /search/findByContent` - Full-text search\n- `GET /search/findByName` - Filename search\n- `GET /search/findByKeywords` - Keyword search\n\n**Workflows:**\n- `GET /workflow/getAllProcessDefinitions` - List workflows\n- `GET /workflow/getAllProcessDefinitionsByName` - Find workflow by name\n- `POST /workflow/runProcessDefinition` - Start workflow\n- `GET /workflow/findTaskInstances` - Get tasks by document\n- `GET /workflow/findTaskInstancesByActor` - Get tasks by actor\n- `POST /workflow/setTaskInstanceValues` - Complete task\n- `POST /workflow/addTaskInstanceComment` - Add comment\n- `POST /workflow/setTaskInstanceActor` - Assign task\n","tags":{"latest":"1.0.1","latest OpenKM openkm Document Management Rest API Document Versioning":"1.0.1","latest openkm Document Management Rest API Versioning Checkout":"1.0.1"},"stats":{"comments":0,"downloads":1798,"installsAllTime":2,"installsCurrent":2,"stars":5,"versions":2},"createdAt":1770432240734,"updatedAt":1778486069788},"latestVersion":{"version":"1.0.1","createdAt":1770487103568,"changelog":"No user-visible changes in this release.","license":null},"metadata":{"setup":[{"key":"OPENKM_BASE_URL","required":true},{"key":"OPENKM_USERNAME","required":true},{"key":"OPENKM_PASSWORD","required":true}],"os":null,"systems":null},"owner":{"handle":"pes0","userId":"s177x4pf4f1dctb2byj7necdz98842pc","displayName":"pes0","image":"https://avatars.githubusercontent.com/u/11735198?v=4"},"moderation":null}