mistral-openapi-client 0.1.0

Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
Documentation
# \BetaLibrariesDocumentsApi

All URIs are relative to *https://api.mistral.ai*

Method | HTTP request | Description
------------- | ------------- | -------------
[**libraries_documents_delete_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_delete_v1 | **DELETE** /v1/libraries/{library_id}/documents/{document_id} | Delete a document.
[**libraries_documents_get_extracted_text_signed_url_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_get_extracted_text_signed_url_v1 | **GET** /v1/libraries/{library_id}/documents/{document_id}/extracted-text-signed-url | Retrieve the signed URL of text extracted from a given document.
[**libraries_documents_get_signed_url_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_get_signed_url_v1 | **GET** /v1/libraries/{library_id}/documents/{document_id}/signed-url | Retrieve the signed URL of a specific document.
[**libraries_documents_get_status_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_get_status_v1 | **GET** /v1/libraries/{library_id}/documents/{document_id}/status | Retrieve the processing status of a specific document.
[**libraries_documents_get_text_content_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_get_text_content_v1 | **GET** /v1/libraries/{library_id}/documents/{document_id}/text_content | Retrieve the text content of a specific document.
[**libraries_documents_get_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_get_v1 | **GET** /v1/libraries/{library_id}/documents/{document_id} | Retrieve the metadata of a specific document.
[**libraries_documents_list_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_list_v1 | **GET** /v1/libraries/{library_id}/documents | List documents in a given library.
[**libraries_documents_reprocess_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_reprocess_v1 | **POST** /v1/libraries/{library_id}/documents/{document_id}/reprocess | Reprocess a document.
[**libraries_documents_update_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_update_v1 | **PUT** /v1/libraries/{library_id}/documents/{document_id} | Update the metadata of a specific document.
[**libraries_documents_upload_v1**]BetaLibrariesDocumentsApi.md#libraries_documents_upload_v1 | **POST** /v1/libraries/{library_id}/documents | Upload a new document.



## libraries_documents_delete_v1

> libraries_documents_delete_v1(library_id, document_id)
Delete a document.

Given a library and a document in that library, delete that document. The document will be deleted from the library and the search index.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

 (empty response body)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_get_extracted_text_signed_url_v1

> String libraries_documents_get_extracted_text_signed_url_v1(library_id, document_id)
Retrieve the signed URL of text extracted from a given document.

Given a library and a document in that library, retrieve the signed URL of text extracted. For documents that are sent to the OCR this returns the result of the OCR queries.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

**String**

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_get_signed_url_v1

> String libraries_documents_get_signed_url_v1(library_id, document_id)
Retrieve the signed URL of a specific document.

Given a library and a document in that library, retrieve the signed URL of a specific document.The url will expire after 30 minutes and can be accessed by anyone with the link.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

**String**

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_get_status_v1

> models::ProcessingStatusOut libraries_documents_get_status_v1(library_id, document_id)
Retrieve the processing status of a specific document.

Given a library and a document in that library, retrieve the processing status of that document.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

[**models::ProcessingStatusOut**](ProcessingStatusOut.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_get_text_content_v1

> models::DocumentTextContent libraries_documents_get_text_content_v1(library_id, document_id)
Retrieve the text content of a specific document.

Given a library and a document in that library, you can retrieve the text content of that document if it exists. For documents like pdf, docx and pptx the text content results from our processing using Mistral OCR.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

[**models::DocumentTextContent**](DocumentTextContent.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_get_v1

> models::DocumentOut libraries_documents_get_v1(library_id, document_id)
Retrieve the metadata of a specific document.

Given a library and a document in this library, you can retrieve the metadata of that document.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

[**models::DocumentOut**](DocumentOut.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_list_v1

> models::ListDocumentOut libraries_documents_list_v1(library_id, search, page_size, page, filters_attributes, sort_by, sort_order)
List documents in a given library.

Given a library, lists the document that have been uploaded to that library.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**search** | Option<**String**> |  |  |
**page_size** | Option<**i32**> |  |  |[default to 100]
**page** | Option<**i32**> |  |  |[default to 0]
**filters_attributes** | Option<**String**> |  |  |
**sort_by** | Option<**String**> |  |  |[default to created_at]
**sort_order** | Option<**String**> |  |  |[default to desc]

### Return type

[**models::ListDocumentOut**](ListDocumentOut.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_reprocess_v1

> libraries_documents_reprocess_v1(library_id, document_id)
Reprocess a document.

Given a library and a document in that library, reprocess that document, it will be billed again.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |

### Return type

 (empty response body)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_update_v1

> models::DocumentOut libraries_documents_update_v1(library_id, document_id, document_update_in)
Update the metadata of a specific document.

Given a library and a document in that library, update the name of that document.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**document_id** | **uuid::Uuid** |  | [required] |
**document_update_in** | [**DocumentUpdateIn**]DocumentUpdateIn.md |  | [required] |

### Return type

[**models::DocumentOut**](DocumentOut.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## libraries_documents_upload_v1

> models::DocumentOut libraries_documents_upload_v1(library_id, file)
Upload a new document.

Given a library, upload a new document to that library. It is queued for processing, it status will change it has been processed. The processing has to be completed in order be discoverable for the library search

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**library_id** | **uuid::Uuid** |  | [required] |
**file** | **std::path::PathBuf** | The File object (not file name) to be uploaded.  To upload a file and specify a custom file name you should format your request as such:  ```bash  file=@path/to/your/file.jsonl;filename=custom_name.jsonl  ```  Otherwise, you can just keep the original file name:  ```bash  file=@path/to/your/file.jsonl  ``` | [required] |

### Return type

[**models::DocumentOut**](DocumentOut.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)