1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
|
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="discoveryengine_v1alpha.html">Discovery Engine API</a> . <a href="discoveryengine_v1alpha.projects.html">projects</a> . <a href="discoveryengine_v1alpha.projects.locations.html">locations</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.html">collections</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.engines.html">engines</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.engines.sessions.html">sessions</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.engines.sessions.files.html">files</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists metadata for all files in the current session.</p>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists metadata for all files in the current session.
Args:
parent: string, Required. The resource name of the Session. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` Name of the session resource to which the file belong. (required)
filter: string, Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the files being filtered. Filter expression is case-sensitive. Currently supported field names are: * upload_time * last_add_time * last_use_time * file_name * mime_type Some examples of filters would be: * "file_name = 'file_1'" * "file_name = 'file_1' AND mime_type = 'text/plain'" * "last_use_time > '2025-06-14T12:00:00Z'" For a full description of the filter format, please see https://google.aip.dev/160.
orderBy: string, Optional. Specifies the order in which files are returned. The value is a comma-separated string of fields to sort by. For ascending order - just the field name is used. For descending order - the field name is suffixed with ` desc`. Sorting is stable and applied sequentially according to the order of fields provided in the string. Supported fields for ordering: * `upload_time`: The time the file was uploaded. * `file_name`: The name of the file. * `mime_type`: The MIME type of the file. * `session_name`: The name of the session the file belongs to. Default Behavior: If the `order_by` field is not specified, files will be returned sorted by creation time in descending order. Examples: 1. Sort by file name in ascending order: `file_name` 2. Sort by upload time in descending order: `upload_time desc` 3. Sort by file name (ascending), then by content type (MIME type) (descending), and finally by upload time (ascending): `file_name, mime_type desc, upload_time`
pageSize: integer, Optional. The maximum number of files to return. The service may return fewer than this value. If unspecified, at most 100 files will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. If user specifies a value less than or equal to 0 - the request will be rejected with an INVALID_ARGUMENT error.
pageToken: string, Optional. A page token received from a previous `ListFiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFiles` must match the call that provided the page token (except `page_size`, which may differ).
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for SessionService.ListFiles method.
"files": [ # The FileMetadatas.
{ # Represents a file attached to a session (context file)
"byteSize": "A String", # Output only. The size of the context file in bytes.
"downloadUri": "A String", # Output only. The AssistantService.DownloadSessionFile URL to download the file. This URL will need the same credentials as AssistantService.ListSessionFileMetadata method and will provide the resource.
"fileId": "A String", # Output only. The ID of the file.
"fileOriginType": "A String", # Optional. The origin of the file.
"lastAddTime": "A String", # Output only. The time the file was added to the session. Note that if a file was added, then modified externally, then added again, the add time will be updated.
"metadata": { # Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.
"a_key": "A String",
},
"mimeType": "A String", # The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.
"name": "A String", # Output only. The name of the file uploaded.
"originalSourceType": "A String", # Optional. The type of the original source of the file.
"originalUri": "A String", # Optional. The original location of the file. It may be a local file path, or any other URI that allows accessing the file in an external system. There are two scenarios in which this url may be empty: 1. If the file was sent as inline data (e.g. pasted from the clipboard). 2. If the original location is not available. Note that there's no guarantee that the URI will be pointing to a valid or actually existing file. For example, a file might have been uploaded to the session, and then deleted from the original source.
"uploadTime": "A String", # Output only. The time the file was uploaded (If this is a file generated by an internal process and then made available to the session, this indicates the moment it happened).
"views": { # Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys: - "thumbnail" - "mobile_thumbnail" - "clip" - "summary" - "translation"
"a_key": { # Represents a specific alternate version or "view" of a file object, such as a summary, a thumbnail, a translated version, etc.
"byteSize": "A String", # Output only. The size of the view in bytes.
"createTime": "A String", # Output only. The time the view was created.
"fileCharacteristics": { # Caracteristics of other file types. # Output only. Characteristics of other file types.
"characteristics": { # Output only. Generic map of characteristics.
"a_key": "A String",
},
},
"imageCharacteristics": { # Standard characteristics of an image media view. # Output only. Characteristics of an image media view.
"bitDepth": 42, # Output only. Bit depth of the image (e.g., 8-bit, 16-bit).
"colorSpace": "A String", # Output only. Color space of the image (e.g., "RGB", "CMYK", "Grayscale").
"height": 42, # Output only. Image height in pixels.
"width": 42, # Output only. Image width in pixels.
},
"mimeType": "A String", # Output only. MIME type (e.g., "image/jpeg", "image/png", "text/plain", "video/mp4")
"uri": "A String", # Output only. The URI to access this media view.
"videoCharacteristics": { # Standard characteristics of a video media view. # Output only. Characteristics of a video media view.
"audioBitrateKbps": 42, # Output only. Bitrate of the audio in kbps.
"audioCodecs": [ # Output only. Audio codecs used in the video.
"A String",
],
"duration": "A String", # Output only. Video duration.
"frameRate": 3.14, # Output only. Frame rate (frames per second).
"height": 42, # Output only. Video height in pixels.
"videoBitrateKbps": 42, # Output only. Bitrate of the video in kbps.
"videoCodecs": [ # Output only. Video codecs used in the video.
"A String",
],
"width": 42, # Output only. Video width in pixels.
},
"viewId": "A String", # Output only. Globally Unique id for this specific view.
},
},
},
],
"nextPageToken": "A String", # A token to retrieve next page of results. Pass this value in the ListFilesRequest.page_token field in the subsequent call to `ListFiles` method to retrieve the next page of results.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next()</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>
|