Skip to content

Add a new /all/msgpack endpoint in the API #3593#3616

Closed
yogendrarau wants to merge 1 commit into
nicolargo:developfrom
yogendrarau:enhance/all-msgpack-endpoint-3593
Closed

Add a new /all/msgpack endpoint in the API #3593#3616
yogendrarau wants to merge 1 commit into
nicolargo:developfrom
yogendrarau:enhance/all-msgpack-endpoint-3593

Conversation

@yogendrarau

@yogendrarau yogendrarau commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Description

Add a compact binary alternative to the /all endpoint, which returns a very large JSON payload. The new GET /api/4/all/msgpack endpoint returns the same dictionary of all plugin stats serialized to MessagePack using msgspec (~25% smaller than JSON on a typical payload).

  • GlancesMsgpackResponse mirrors GlancesJSONResponse; msgspec encodes datetime as ISO 8601 strings, so the decoded payload matches /all.
  • msgspec is optional: the endpoint returns HTTP 501 if it is missing, and it is added to the "web" optional-dependencies group.
  • Add a RESTful test, document the endpoint, and regenerate openapi.json.

Resume

Add a compact binary alternative to the /all endpoint, which returns a
very large JSON payload. The new GET /api/4/all/msgpack endpoint returns
the same dictionary of all plugin stats serialized to MessagePack using
msgspec (~25% smaller than JSON on a typical payload).

- GlancesMsgpackResponse mirrors GlancesJSONResponse; msgspec encodes
  datetime as ISO 8601 strings, so the decoded payload matches /all.
- msgspec is optional: the endpoint returns HTTP 501 if it is missing,
  and it is added to the "web" optional-dependencies group.
- Add a RESTful test, document the endpoint, and regenerate openapi.json.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nicolargo

Copy link
Copy Markdown
Owner

Hi @yogendrarau

first of all thanks for the PR.

As said in the #3593 issue, the feature is targeted in the Glances v5 version. This version will break the API and integrate new features (like the /all/msgpack option).

Sorry but i must reject the PR for the moment. Feel free to contribute again the Glances v5 will be opened to PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants