# \UploadsApi All URIs are relative to *http://your-mattermost-url.com/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_upload**](UploadsApi.md#create_upload) | **POST** /uploads | Create an upload [**get_upload**](UploadsApi.md#get_upload) | **GET** /uploads/{upload_id} | Get an upload session [**upload_data**](UploadsApi.md#upload_data) | **POST** /uploads/{upload_id} | Perform a file upload ## create_upload > crate::models::UploadSession create_upload(create_upload_request) Create an upload Creates a new upload session. __Minimum server version__: 5.28 ##### Permissions Must have `upload_file` permission. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **create_upload_request** | [**CreateUploadRequest**](CreateUploadRequest.md) | | [required] | ### Return type [**crate::models::UploadSession**](UploadSession.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### 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) ## get_upload > get_upload(upload_id) Get an upload session Gets an upload session that has been previously created. ##### Permissions Must be logged in as the user who created the upload session. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **upload_id** | **String** | The ID of the upload session to get. | [required] | ### Return type (empty response body) ### Authorization [bearerAuth](../README.md#bearerAuth) ### 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) ## upload_data > crate::models::FileInfo upload_data(upload_id) Perform a file upload Starts or resumes a file upload. To resume an existing (incomplete) upload, data should be sent starting from the offset specified in the upload session object. The request body can be in one of two formats: - Binary file content streamed in request's body - multipart/form-data ##### Permissions Must be logged in as the user who created the upload session. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **upload_id** | **String** | The ID of the upload session the data belongs to. | [required] | ### Return type [**crate::models::FileInfo**](FileInfo.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - **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)