Migrate TrueNAS apps to JSON-RPC 2.0 WebSocket API#889
Open
jaycollett wants to merge 1 commit intolinuxserver:masterfrom
Open
Migrate TrueNAS apps to JSON-RPC 2.0 WebSocket API#889jaycollett wants to merge 1 commit intolinuxserver:masterfrom
jaycollett wants to merge 1 commit intolinuxserver:masterfrom
Conversation
TrueNAS is deprecating the REST API (api/v2.0/) in version 26.04, requiring migration to JSON-RPC 2.0 over WebSocket. This commit updates TrueNASCORE and TrueNASSCALE apps: - Add TrueNASApiTrait with shared WebSocket/REST logic - Support three API modes: auto, websocket, rest - Auto mode tries WebSocket first with REST fallback - Add API mode selector to config UI - Maintain backward compatibility with older TrueNAS versions API mapping: - core/ping -> core.ping - system/info -> system.info - alert/list -> alert.list Requires: linuxserver/Heimdall#PR (WebSocket support)
4 tasks
Collaborator
|
Sorry for the delay. I was busy working on https://opencommit.eu related stuff. I have no control over linuxserver/Heimdall so I'll leave this open and unmerged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TrueNAS is deprecating the REST API (
api/v2.0/) in version 26.04, requiring migration to JSON-RPC 2.0 over WebSocket. This PR updates TrueNAS CORE and SCALE apps to support the new API.Dependency
Changes
New Files
TrueNASCORE/TrueNASApiTrait.php- Shared trait for WebSocket/REST API communicationUpdated Files
TrueNASCORE/TrueNASCORE.php- Updated to use the shared traitTrueNASCORE/config.blade.php- Added API mode selectorTrueNASSCALE/TrueNASSCALE.php- Updated to use the shared traitTrueNASSCALE/config.blade.php- Added API mode selectorFeatures
API Mode Selection
Users can choose between three modes:
API Mapping
core/pingcore.pingsystem/infosystem.infoalert/listalert.listBackward Compatibility
References
Test Plan