Class RawFilesClient
- java.lang.Object
-
- ai.extend.resources.files.RawFilesClient
-
public class RawFilesClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description RawFilesClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtendClientHttpResponse<FilesDeleteResponse>delete(java.lang.String id)Delete a file and all associated data from Extend.ExtendClientHttpResponse<FilesDeleteResponse>delete(java.lang.String id, RequestOptions requestOptions)Delete a file and all associated data from Extend.ExtendClientHttpResponse<FilesListResponse>list()List files.ExtendClientHttpResponse<FilesListResponse>list(RequestOptions requestOptions)List files.ExtendClientHttpResponse<FilesListResponse>list(FilesListRequest request)List files.ExtendClientHttpResponse<FilesListResponse>list(FilesListRequest request, RequestOptions requestOptions)List files.ExtendClientHttpResponse<File>retrieve(java.lang.String id)Fetch a file by its ID.ExtendClientHttpResponse<File>retrieve(java.lang.String id, RequestOptions requestOptions)Fetch a file by its ID.ExtendClientHttpResponse<File>retrieve(java.lang.String id, FilesRetrieveRequest request)Fetch a file by its ID.ExtendClientHttpResponse<File>retrieve(java.lang.String id, FilesRetrieveRequest request, RequestOptions requestOptions)Fetch a file by its ID.ExtendClientHttpResponse<File>upload(java.io.File file, FilesUploadRequest request)Upload and create a new file in Extend.ExtendClientHttpResponse<File>upload(java.io.File file, FilesUploadRequest request, RequestOptions requestOptions)Upload and create a new file in Extend.
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
RawFilesClient
public RawFilesClient(ClientOptions clientOptions)
-
-
Method Detail
-
list
public ExtendClientHttpResponse<FilesListResponse> list()
List files.
-
list
public ExtendClientHttpResponse<FilesListResponse> list(RequestOptions requestOptions)
List files.
-
list
public ExtendClientHttpResponse<FilesListResponse> list(FilesListRequest request)
List files.
-
list
public ExtendClientHttpResponse<FilesListResponse> list(FilesListRequest request, RequestOptions requestOptions)
List files.
-
retrieve
public ExtendClientHttpResponse<File> retrieve(java.lang.String id)
Fetch a file by its ID.
-
retrieve
public ExtendClientHttpResponse<File> retrieve(java.lang.String id, RequestOptions requestOptions)
Fetch a file by its ID.
-
retrieve
public ExtendClientHttpResponse<File> retrieve(java.lang.String id, FilesRetrieveRequest request)
Fetch a file by its ID.
-
retrieve
public ExtendClientHttpResponse<File> retrieve(java.lang.String id, FilesRetrieveRequest request, RequestOptions requestOptions)
Fetch a file by its ID.
-
delete
public ExtendClientHttpResponse<FilesDeleteResponse> delete(java.lang.String id)
Delete a file and all associated data from Extend. This operation is permanent and cannot be undone.This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.
-
delete
public ExtendClientHttpResponse<FilesDeleteResponse> delete(java.lang.String id, RequestOptions requestOptions)
Delete a file and all associated data from Extend. This operation is permanent and cannot be undone.This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.
-
upload
public ExtendClientHttpResponse<File> upload(java.io.File file, FilesUploadRequest request)
Upload and create a new file in Extend.This endpoint accepts file contents and registers them as a File in Extend, which can be used for running workflows, creating evaluation set items, parsing, etc.
If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF.
Supported file types can be found here.
This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).
-
upload
public ExtendClientHttpResponse<File> upload(java.io.File file, FilesUploadRequest request, RequestOptions requestOptions)
Upload and create a new file in Extend.This endpoint accepts file contents and registers them as a File in Extend, which can be used for running workflows, creating evaluation set items, parsing, etc.
If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF.
Supported file types can be found here.
This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).
-
-