Skip to content

Deprecation of Size Query Parameter in Core API Search Endpoint

Change

The size query parameter for the Core API search endpoint (POST /api/dataexplorer/search) is being deprecated in Flywheel v21.4.0. This parameter is redundant with the equivalent size parameter available in the request body.

The query parameter will continue to function in v21.x releases but is scheduled for removal in a future major version.

Reason For Change

  • The size parameter in the request body provides identical functionality to the query parameter.
  • Having multiple ways to specify the same parameter creates unnecessary complexity and potential for confusion.
  • Consolidating to a single method (request body parameter) aligns with REST API best practices for POST endpoints.

For Flywheel SDK Users

If you are passing size as a separate parameter to the fw.search() method, update your code to include size within the SearchQuery object instead.

Example change:

1
2
3
4
5
6
7
8
9
import flywheel

fw = flywheel.Client()

# Deprecated: size as separate parameter
results = fw.search(flywheel.SearchQuery(return_type="subject"), size=1)

# Correct: size within SearchQuery
results = fw.search(flywheel.SearchQuery(return_type="subject", size=1))

No action is required if you already include size within the SearchQuery object.

For Direct API Users

If your application directly calls the Core API search endpoint with the size query parameter:

  • Update your code to pass the size parameter in the request body instead of as a query parameter.
  • Example change:
    • Before: POST /api/dataexplorer/search?size=100 with request body
    • After: POST /api/dataexplorer/search with size included in the request body

No action is required if you already use the request body parameter.