Skip to content

support query params and json output on GET /contiainers#132

Merged
mie-jcrandal merged 1 commit intomainfrom
131-accept-query-parameters-and-return-json-on-containers-endpoint-when-accept-encoding-applicationjson
Nov 21, 2025
Merged

support query params and json output on GET /contiainers#132
mie-jcrandal merged 1 commit intomainfrom
131-accept-query-parameters-and-return-json-on-containers-endpoint-when-accept-encoding-applicationjson

Conversation

@runleveldev
Copy link
Collaborator

This pull request improves the /containers endpoint by adding support for filtering containers using query parameters and by allowing clients to request a JSON response if preferred. These changes enhance the flexibility and usability of the API.

Improvements to API filtering and response format:

  • The where clause in the Container.findAll query now merges req.session.user with any query parameters in req.query, allowing clients to filter containers by additional fields.
  • The endpoint now checks the client's Accept header and returns a JSON response if application/json is preferred over text/html, improving support for API consumers.

@runleveldev runleveldev changed the base branch from main to opensource.mieweb.org November 20, 2025 01:28
@runleveldev runleveldev changed the base branch from opensource.mieweb.org to main November 20, 2025 01:30
@mie-jcrandal mie-jcrandal merged commit bf35dc9 into main Nov 21, 2025
3 checks passed
@mie-jcrandal mie-jcrandal deleted the 131-accept-query-parameters-and-return-json-on-containers-endpoint-when-accept-encoding-applicationjson branch November 21, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept query parameters and return JSON on containers endpoint when accept-encoding: application/json

2 participants