Question list payload: measure, trim, and page the largest list
Use this guide for the Question list endpoint. A list returns one trimmed page of summary rows. Full question text, full answer text, source bodies, history, and attachment content load only when one record is opened. The envelope, status codes, date format, and identifier type stay the same, so a legacy client that reads id, title, status, and dates keeps working.
Measure a Question list request before you change it
Record the same request before and after the change, with the same college workspace, assistant, channel, filters, sort, limit, and offset. Change one thing at a time.
Step 1: Record the untrimmed list request
Send the Question list request with an explicit limit and offset. Record the status, the Content-Length when sent, the body size as received, the rows returned, and the fields present in each row, including any full text or attachment field.
Step 2: Record the same request with compression accepted
Send the same request with gzip or brotli accepted. Record the Content-Encoding and the wire size. Compare wire size with wire size. Do not compare a compressed size with an uncompressed size as if they were the same measure.
Step 3: Compute bytes per row
Divide the body size by the rows returned. A high bytes per row on a list usually means full text or attachment data is in every row. Both rows per request and bytes per row must fall after the change, or the change does not shrink the payload.
Step 4: Confirm the contract after the change
Confirm a success response still has ok set to true with values in data, an error response still has ok set to false with a plain message in error, an empty list is an empty array and never null, a missing value is null, a zero count is 0, times are ISO 8601 in UTC, and identifiers are strings passed back unchanged. Confirm the status code did not change in the same release as the payload change.
Audit: where the Question list over-fetches
Example only. The field groups below state what the row shows and what belongs only in the detail view. No new field, role, or permission is added by this page.
| View | Fields the row needs | Fields to move to detail only | Risk if the row keeps them |
|---|---|---|---|
| Question list | Record id, title in short form, college workspace, assistant, channel, outcome, submitted time, source title, source link, last checked date, and helpful and not helpful counts | Full question text, full answer text, each source body, history entries, rating comments, discussion and handoff detail, and attachment content and attachment bytes | Every row pays for full question and answer text and source bodies, so page size grows with text length and attachment size instead of row count, and a 10 MB attachment field can dominate a whole page |
- Attachment metadata is not attachment content. A list may return file name, type, and size only when the screen shows them. File bytes load only on detail or on an explicit download for that one record.
- A screen may name fields with a fields parameter that lists field names from the allowlist for this endpoint. The server returns only allowlisted fields that were requested, plus id, total, limit, offset, sort, and hasMore for paging and linking.
- Unknown field names in a fields request are ignored. They do not widen the college scope, add a record from another college, or change a status code.
- When no fields parameter is sent, the server returns the default summary fields in the contract table below. The applied field list is not added as a new top level field. The envelope stays ok, data, and error, with values inside data.
Trimmed and paginated contract for the Question list
Apply every rule in one change. A list response contains no body field and no attachment content. A detail response is requested only when a row is opened.
| View | List fields returned | Page size and order | Detail fields added on open |
|---|---|---|---|
| Question list | Id, title, workspace, assistant, channel, outcome, submitted time, source title, source link, last checked date, and rating counts. No question body, no answer body, no source body, no history, no attachment content | 50 per page by default, 200 as the stated maximum, newest submitted first, with limit and offset for the next page, hasMore, and a total count from the server index | Full question, full answer, each source body reference, history, rating comments, discussion, handoff in that one record, and attachment download for that one record |
- One page size for this list, 50 by default and 200 as the stated maximum, matching List pagination, sorting, and filtering, so a page cost is predictable
- Limit and offset pagination only, with hasMore returned and a total count returned from the server index, counted with the same filters as the items
- Every sort ends with the record id in ascending order as a tie break, so a page boundary does not move a row between pages
- Server side sort and filter in one college workspace at a time, with the same workspace, assistant, channel, and date range filters on the list and on the count
- A detail request returns one record only, so opening one row adds one body, not a page of bodies
- An empty list returns a zero count, the filters as applied, and the empty state for that list, with no body field
Worked example: byte savings per page
Example only. Figures use the example record sizes in this table, not production measurements. Use the estimator below with measured sizes from your own network panel to replace them.
| View | Untrimmed bytes per record | Trimmed bytes per record | Saving per record | Saving per 25 row page |
|---|---|---|---|---|
| Question list, example | 9600 | 540 | 9060 bytes, 94.4 percent | 240000 bytes down to 13500 bytes, saving 226500 bytes per page |
- Question list, example record mix: full question text 2000 bytes, full answer text 4000 bytes, source body 2000 bytes, history and comments 900 bytes, other fields 700 bytes, total 9600 bytes. Trimmed row keeps id, title, workspace, assistant, channel, outcome, submitted time, source title, source link, last checked date, and counts, total 540 bytes.
- At the default page size of 50 rows, the same example is 480000 bytes down to 27000 bytes, saving 453000 bytes per page.
- Detail on demand, example: opening one question detail adds 9600 bytes once. One trimmed page of 25 rows plus one detail is 23100 bytes, against 240000 bytes for the untrimmed page alone, saving 216900 bytes in that open flow.
- Attachment content is not in either total. One attachment field held in every row would add its file size to every row. Keeping file bytes in detail only removes that cost from the list entirely.
Estimate savings for your own page size
Enter a page size and example record sizes. Rows per page is enforced to the contract: 1 to 200, with 50 as the default. No unbounded list is allowed in the estimate. Nothing entered here is sent to a server.
Default 50 rows per page, maximum 200. Values above 50 increase median payload linearly. Use the default page preset to measure the median page.
Include full question, answer, source body, and history. This is the over-fetched baseline.
Summary budget is 540 bytes per record (id, title, workspace, assistant, channel, outcome, times, source link, counts). Values above 540 mean full-text or attachment fields are still in the list row; move them to detail only.
Choose a preset or enter your own sizes, then choose Estimate savings. Estimates enforce a 50-row default and a 200-row maximum, and warn when trimmed bytes exceed the 540-byte summary budget.
Compression and caching for this endpoint
Compress a JSON response only when the browser states it can read the encoding. Keep signed-in responses private and unstored, so a smaller payload never reuses a response across people or colleges.
Compression rules
- Send Content-Encoding with gzip or brotli only when the request accepts that encoding
- Send Vary with Accept-Encoding on a response that can be compressed, so a cache does not serve a compressed body to a browser that did not accept it
- Do not compress a body that is already compressed or a body below the server threshold for compression, where compression would add bytes instead of saving them
- Record the encoding and the wire size in the measurement record, so a compressed size is never read as an uncompressed size
Caching rules that stay in place
- Signed-in API responses use private, no-store, with no shared cache and no stale copy
- Do not set a long lived cache on a signed-in Question list response to shrink bytes. Shrink the fields and the page size instead
- Content-hashed files under assets can be cached long. Unhashed files whose names do not change between versions use a short maximum age with revalidation
Checks before you ship a payload change
Run each check on phone and desktop, in one college workspace, before you publish.
- The same Question list request measured before and after shows fewer rows per request, fewer fields per list row, no body field and no attachment content in the list payload, a smaller body size as received, and a lower bytes per row
- The envelope, status codes, date format, null and empty list rules, and identifier type are unchanged, and a legacy client reader still parses the new shape
- Opening one row adds one detail payload only, and the detail shows full text with source title, source link, and last checked date
- Page one and page two together hold every filtered row once, with no row repeated and no row skipped, and the total matches the count on screen on both pages
- An invalid limit, offset, sort, or field name falls back as stated and echoes the applied value, and never widens the college scope
- A record from another college never appears in items or in total, and test sessions are excluded from items and total and labeled as excluded
- A compressed response is sent only when accepted, Vary is sent on a compressible response, and signed-in responses remain private with no-store
- An empty list shows one empty state with a count of zero, keeps filters visible, and focus stays on the filter control
Follow API payload performance for the Answer, Source, and Workspace audits, List pagination, sorting, and filtering for the full request and response contract, and Read reports for counts by college and assistant.
Next guide
Use one list contract on every screen, from a public guide list to a signed-in question list.