I am looking for clarification of the supported response contract for this Cloud Storage JSON API download endpoint:
GET https://storage.googleapis.com/download/storage/v1/b/{BUCKET}/o/{OBJECT_ENCODED}?alt=media
The names in braces are placeholders, not real resources. The requirement is to receive the object bytes and identify their exact object generation in one download response, without a separate metadata request or automatically following redirects.
Questions
- Does
x-goog-generationform part of the supported response contract for this JSON API endpoint? If not, is there another response header or field that identifies the generation of the returned content? - Is that identifier guaranteed to be present and to correspond to the response body both when supplying
generation={GENERATION}and when omitting it to select the current version? In the latter case, does it identify precisely the version being downloaded even if the object is concurrently replaced? - What are the conditions and exceptions (successful response types, possible omission, content transformations), and which official reference establishes this specifically for JSON API downloads?
I would appreciate a distinction between a supported guarantee and behavior that merely happens to be observable today. An official documentation reference or clarification from the product team would be particularly helpful.
Documentation reviewed
- Request endpoints: documents the
/downloadendpoint withstorage.googleapis.com. - Objects: get: documents the
generationselector andalt=media, but I have not found how the effective generation is returned together with the content. - JSON API headers and common parameters: I have not located a definition of
x-goog-generationfor this response. - Object metadata: explains generations and limitations on interpreting ETags.
- JSON API status codes: describes
303 mediaDownloadRedirectwhen/downloadis omitted. This question concerns the direct endpoint above.
This is a documentation question, not a claim that the capability is impossible or a report of an observed service defect. Copying the request selector, inferring a generation from ETag, or transferring an XML API guarantee to JSON would not establish a server-returned generation for this requirement.
Thank you for any clarification or precise documentation reference.