pub struct FilesApi { /* private fields */ }Expand description
File upload for multimodal content
Implementations§
Source§impl FilesApi
impl FilesApi
Sourcepub async fn delete(&self, file_id: &str) -> Result<DeleteFileResponse>
pub async fn delete(&self, file_id: &str) -> Result<DeleteFileResponse>
Delete file
DELETE /api/v1/files/{fileId}
Required scopes: files:write.
Sourcepub async fn download_file_content(&self, file_id: &str) -> Result<Bytes>
pub async fn download_file_content(&self, file_id: &str) -> Result<Bytes>
Download file content
GET /api/v1/files/{fileId}/content
Required scopes: files:read.
Sourcepub async fn get_file_metadata(&self, file_id: &str) -> Result<FileRecord>
pub async fn get_file_metadata(&self, file_id: &str) -> Result<FileRecord>
Get file metadata
GET /api/v1/files/{fileId}
Required scopes: files:read.
Sourcepub async fn list(&self, params: &ListFilesParams) -> Result<ListFilesResponse>
pub async fn list(&self, params: &ListFilesParams) -> Result<ListFilesResponse>
List files
GET /api/v1/files
Required scopes: files:read.
Sourcepub fn list_all<'a>(
&'a self,
params: &'a ListFilesParams,
) -> impl Stream<Item = Result<FileEntry>> + 'a
pub fn list_all<'a>( &'a self, params: &'a ListFilesParams, ) -> impl Stream<Item = Result<FileEntry>> + 'a
Stream every item returned by listFiles, following the cursor cursor until the server
reports no further pages.
Sourcepub async fn upload(
&self,
body: &UploadFileRequest,
) -> Result<UploadFileResponse>
pub async fn upload( &self, body: &UploadFileRequest, ) -> Result<UploadFileResponse>
Upload a file for multimodal content
Accepts multipart/form-data or base64 JSON. Files persist until explicit delete by default;
operators can opt into a retention policy via config.retention.artifact_ttl_days.
POST /api/v1/files
Required scopes: files:write.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FilesApi
impl !UnwindSafe for FilesApi
impl Freeze for FilesApi
impl Send for FilesApi
impl Sync for FilesApi
impl Unpin for FilesApi
impl UnsafeUnpin for FilesApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more