Package org.openapitools.client.api
Class FileApi
- java.lang.Object
-
- org.openapitools.client.api.FileApi
-
public class FileApi extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteFileHandler(String trDataset, UUID fileId, Boolean deleteChunks)Delete File Delete File Delete a file from S3 attached to the server based on its id.okhttp3.CalldeleteFileHandlerAsync(String trDataset, UUID fileId, Boolean deleteChunks, ApiCallback<Void> _callback)Delete File (asynchronously) Delete File Delete a file from S3 attached to the server based on its id.okhttp3.CalldeleteFileHandlerCall(String trDataset, UUID fileId, Boolean deleteChunks, ApiCallback _callback)Build call for deleteFileHandlerApiResponse<Void>deleteFileHandlerWithHttpInfo(@NotNull String trDataset, @NotNull UUID fileId, @NotNull Boolean deleteChunks)Delete File Delete File Delete a file from S3 attached to the server based on its id.ApiClientgetApiClient()StringgetCustomBaseUrl()List<ModelFile>getDatasetFilesHandler(String trDataset, UUID datasetId, Long page)Get Files for Dataset Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter.okhttp3.CallgetDatasetFilesHandlerAsync(String trDataset, UUID datasetId, Long page, ApiCallback<List<ModelFile>> _callback)Get Files for Dataset (asynchronously) Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter.okhttp3.CallgetDatasetFilesHandlerCall(String trDataset, UUID datasetId, Long page, ApiCallback _callback)Build call for getDatasetFilesHandlerApiResponse<List<ModelFile>>getDatasetFilesHandlerWithHttpInfo(@NotNull String trDataset, @NotNull UUID datasetId, @NotNull @Min(0L) Long page)Get Files for Dataset Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter.FileDTOgetFileHandler(String trDataset, UUID fileId)Get File Get File Download a file from S3 attached to the server based on its id.okhttp3.CallgetFileHandlerAsync(String trDataset, UUID fileId, ApiCallback<FileDTO> _callback)Get File (asynchronously) Get File Download a file from S3 attached to the server based on its id.okhttp3.CallgetFileHandlerCall(String trDataset, UUID fileId, ApiCallback _callback)Build call for getFileHandlerApiResponse<FileDTO>getFileHandlerWithHttpInfo(@NotNull String trDataset, @NotNull UUID fileId)Get File Get File Download a file from S3 attached to the server based on its id.intgetHostIndex()voidsetApiClient(ApiClient apiClient)voidsetCustomBaseUrl(String customBaseUrl)voidsetHostIndex(int hostIndex)UploadFileResultuploadFileHandler(String trDataset, UploadFileData uploadFileData)Upload File Upload File Upload a file to S3 attached to the server.okhttp3.CalluploadFileHandlerAsync(String trDataset, UploadFileData uploadFileData, ApiCallback<UploadFileResult> _callback)Upload File (asynchronously) Upload File Upload a file to S3 attached to the server.okhttp3.CalluploadFileHandlerCall(String trDataset, UploadFileData uploadFileData, ApiCallback _callback)Build call for uploadFileHandlerApiResponse<UploadFileResult>uploadFileHandlerWithHttpInfo(@NotNull String trDataset, @NotNull UploadFileData uploadFileData)Upload File Upload File Upload a file to S3 attached to the server.
-
-
-
Constructor Detail
-
FileApi
public FileApi()
-
FileApi
public FileApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
getHostIndex
public int getHostIndex()
-
setHostIndex
public void setHostIndex(int hostIndex)
-
getCustomBaseUrl
public String getCustomBaseUrl()
-
setCustomBaseUrl
public void setCustomBaseUrl(String customBaseUrl)
-
deleteFileHandlerCall
public okhttp3.Call deleteFileHandlerCall(String trDataset, UUID fileId, Boolean deleteChunks, ApiCallback _callback) throws ApiException
Build call for deleteFileHandler- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to delete (required)deleteChunks- Whether or not to delete the chunks associated with the file (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 204 Confirmation that the file has been deleted - 400 Service error relating to finding or deleting the file -
-
deleteFileHandler
public void deleteFileHandler(String trDataset, UUID fileId, Boolean deleteChunks) throws ApiException
Delete File Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to delete (required)deleteChunks- Whether or not to delete the chunks associated with the file (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 Confirmation that the file has been deleted - 400 Service error relating to finding or deleting the file -
-
deleteFileHandlerWithHttpInfo
public ApiResponse<Void> deleteFileHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull UUID fileId, @NotNull @NotNull Boolean deleteChunks) throws ApiException
Delete File Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to delete (required)deleteChunks- Whether or not to delete the chunks associated with the file (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 Confirmation that the file has been deleted - 400 Service error relating to finding or deleting the file -
-
deleteFileHandlerAsync
public okhttp3.Call deleteFileHandlerAsync(String trDataset, UUID fileId, Boolean deleteChunks, ApiCallback<Void> _callback) throws ApiException
Delete File (asynchronously) Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to delete (required)deleteChunks- Whether or not to delete the chunks associated with the file (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 204 Confirmation that the file has been deleted - 400 Service error relating to finding or deleting the file -
-
getDatasetFilesHandlerCall
public okhttp3.Call getDatasetFilesHandlerCall(String trDataset, UUID datasetId, Long page, ApiCallback _callback) throws ApiException
Build call for getDatasetFilesHandler- Parameters:
trDataset- The dataset id to use for the request (required)datasetId- The id of the dataset to fetch files for. (required)page- The page number of files you wish to fetch. Each page contains at most 10 files. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 JSON body representing the files in the current dataset - 400 Service error relating to getting the files in the current datase -
-
getDatasetFilesHandler
public List<ModelFile> getDatasetFilesHandler(String trDataset, UUID datasetId, Long page) throws ApiException
Get Files for Dataset Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.- Parameters:
trDataset- The dataset id to use for the request (required)datasetId- The id of the dataset to fetch files for. (required)page- The page number of files you wish to fetch. Each page contains at most 10 files. (required)- Returns:
- List<ModelFile>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 JSON body representing the files in the current dataset - 400 Service error relating to getting the files in the current datase -
-
getDatasetFilesHandlerWithHttpInfo
public ApiResponse<List<ModelFile>> getDatasetFilesHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull UUID datasetId, @NotNull @Min(0L) @NotNull @Min(0L) Long page) throws ApiException
Get Files for Dataset Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.- Parameters:
trDataset- The dataset id to use for the request (required)datasetId- The id of the dataset to fetch files for. (required)page- The page number of files you wish to fetch. Each page contains at most 10 files. (required)- Returns:
- ApiResponse<List<ModelFile>>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 JSON body representing the files in the current dataset - 400 Service error relating to getting the files in the current datase -
-
getDatasetFilesHandlerAsync
public okhttp3.Call getDatasetFilesHandlerAsync(String trDataset, UUID datasetId, Long page, ApiCallback<List<ModelFile>> _callback) throws ApiException
Get Files for Dataset (asynchronously) Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.- Parameters:
trDataset- The dataset id to use for the request (required)datasetId- The id of the dataset to fetch files for. (required)page- The page number of files you wish to fetch. Each page contains at most 10 files. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 JSON body representing the files in the current dataset - 400 Service error relating to getting the files in the current datase -
-
getFileHandlerCall
public okhttp3.Call getFileHandlerCall(String trDataset, UUID fileId, ApiCallback _callback) throws ApiException
Build call for getFileHandler- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to fetch (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 The signed s3 url corresponding to the file_id requested - 400 Service error relating to finding the file -
-
getFileHandler
public FileDTO getFileHandler(String trDataset, UUID fileId) throws ApiException
Get File Get File Download a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to fetch (required)- Returns:
- FileDTO
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 The signed s3 url corresponding to the file_id requested - 400 Service error relating to finding the file -
-
getFileHandlerWithHttpInfo
public ApiResponse<FileDTO> getFileHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull UUID fileId) throws ApiException
Get File Get File Download a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to fetch (required)- Returns:
- ApiResponse<FileDTO>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 The signed s3 url corresponding to the file_id requested - 400 Service error relating to finding the file -
-
getFileHandlerAsync
public okhttp3.Call getFileHandlerAsync(String trDataset, UUID fileId, ApiCallback<FileDTO> _callback) throws ApiException
Get File (asynchronously) Get File Download a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.- Parameters:
trDataset- The dataset id to use for the request (required)fileId- The id of the file to fetch (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 The signed s3 url corresponding to the file_id requested - 400 Service error relating to finding the file -
-
uploadFileHandlerCall
public okhttp3.Call uploadFileHandlerCall(String trDataset, UploadFileData uploadFileData, ApiCallback _callback) throws ApiException
Build call for uploadFileHandler- Parameters:
trDataset- The dataset id to use for the request (required)uploadFileData- JSON request payload to upload a file (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 Confirmation that the file is uploading - 400 Service error relating to uploading the file -
-
uploadFileHandler
public UploadFileResult uploadFileHandler(String trDataset, UploadFileData uploadFileData) throws ApiException
Upload File Upload File Upload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR'ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.- Parameters:
trDataset- The dataset id to use for the request (required)uploadFileData- JSON request payload to upload a file (required)- Returns:
- UploadFileResult
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Confirmation that the file is uploading - 400 Service error relating to uploading the file -
-
uploadFileHandlerWithHttpInfo
public ApiResponse<UploadFileResult> uploadFileHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull UploadFileData uploadFileData) throws ApiException
Upload File Upload File Upload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR'ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.- Parameters:
trDataset- The dataset id to use for the request (required)uploadFileData- JSON request payload to upload a file (required)- Returns:
- ApiResponse<UploadFileResult>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Confirmation that the file is uploading - 400 Service error relating to uploading the file -
-
uploadFileHandlerAsync
public okhttp3.Call uploadFileHandlerAsync(String trDataset, UploadFileData uploadFileData, ApiCallback<UploadFileResult> _callback) throws ApiException
Upload File (asynchronously) Upload File Upload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR'ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.- Parameters:
trDataset- The dataset id to use for the request (required)uploadFileData- JSON request payload to upload a file (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 Confirmation that the file is uploading - 400 Service error relating to uploading the file -
-
-