Skip to content

fix: add fields query param to listDevices for response field projection (OKTA-1277564) - #1712

Open
prachi-okta wants to merge 1 commit into
masterfrom
OKTA-1277564-list-devices-fields-param
Open

prachi-okta wants to merge 1 commit into
masterfrom
OKTA-1277564-list-devices-fields-param

Conversation

@prachi-okta

Copy link
Copy Markdown
Contributor

Summary

  • DeviceIdentityFacadeV1.getDevices has a real fields query param for response field projection (gated behind udcore.switch.enableProjectionsForListDevices), letting callers request a subset of fields to reduce response size.
  • The listDevices operation in src/swagger/api.yaml only documented after, limit, search, expand — there was no 5th slot for fields, so it was a hard SDK gap, not just a missing enum value.
  • Adds fields as a new type: string query parameter (composite/comma-separated expression, not an enum) on listDevices, documented per the accepted syntax from DeviceProjectionFieldValidator:
    • Top-level fields: id, status, created, lastUpdated, profile, _links.
    • Nested profile syntax: profile.<subfield> or profile:(<sub1>,<sub2>,...).
    • id is always force-included even if omitted.

Test plan

  • mvn -pl api generate-sources regenerates DeviceApi.listDevices(String after, Integer limit, String search, String expand, String fields) (5th parameter added, matching the ticket's described gap) plus the additionalHeaders overload.
  • mvn -pl api,impl install -DskipTests builds cleanly with the new generated signature.
  • Same downstream sequence as the getDevice expand fix applies: spec merge → SDK regenerated & new version published → version bump in okta-core → remote-mcp can then add fields support to list_devices.json + ListDevicesAction.java.

AI Attribution: ai-agent-authored

…ion (OKTA-1277564)

DeviceIdentityFacadeV1.getDevices supports a fields query param for
response field projection to reduce payload size, but the listDevices
operation in the spec only documented after/limit/search/expand — fields
could never be passed through the SDK.

Adds fields as a new string query parameter on listDevices, documented
with the accepted syntax (top-level fields, profile.<subfield> and
profile:(...) composite syntax) per DeviceProjectionFieldValidator.

Co-Authored-By: Claude Code
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.

1 participant