# OmsorgCoreClient\DocumentsApi All URIs are relative to http://localhost, except if the operation defines another base path. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**apiDocumentsGet()**](DocumentsApi.md#apiDocumentsGet) | **GET** /api/documents | | | [**apiDocumentsIdDelete()**](DocumentsApi.md#apiDocumentsIdDelete) | **DELETE** /api/documents/{id} | | | [**apiDocumentsIdDownloadGet()**](DocumentsApi.md#apiDocumentsIdDownloadGet) | **GET** /api/documents/{id}/download | | | [**apiDocumentsIdPut()**](DocumentsApi.md#apiDocumentsIdPut) | **PUT** /api/documents/{id} | | | [**apiDocumentsPost()**](DocumentsApi.md#apiDocumentsPost) | **POST** /api/documents | | ## `apiDocumentsGet()` ```php apiDocumentsGet($entity_type, $entity_id): \OmsorgCoreClient\Model\DocumentResponse[] ``` ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OmsorgCoreClient\Api\DocumentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $entity_type = 'entity_type_example'; // string $entity_id = 'entity_id_example'; // string try { $result = $apiInstance->apiDocumentsGet($entity_type, $entity_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->apiDocumentsGet: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **entity_type** | **string**| | [optional] | | **entity_id** | **string**| | [optional] | ### Return type [**\OmsorgCoreClient\Model\DocumentResponse[]**](../Model/DocumentResponse.md) ### Authorization [Bearer](../../README.md#Bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `text/plain`, `application/json`, `text/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) ## `apiDocumentsIdDelete()` ```php apiDocumentsIdDelete($id) ``` ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OmsorgCoreClient\Api\DocumentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = 'id_example'; // string try { $apiInstance->apiDocumentsIdDelete($id); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->apiDocumentsIdDelete: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **id** | **string**| | | ### Return type void (empty response body) ### Authorization [Bearer](../../README.md#Bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) ## `apiDocumentsIdDownloadGet()` ```php apiDocumentsIdDownloadGet($id) ``` ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OmsorgCoreClient\Api\DocumentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = 'id_example'; // string try { $apiInstance->apiDocumentsIdDownloadGet($id); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->apiDocumentsIdDownloadGet: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **id** | **string**| | | ### Return type void (empty response body) ### Authorization [Bearer](../../README.md#Bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) ## `apiDocumentsIdPut()` ```php apiDocumentsIdPut($id, $update_document_request): \OmsorgCoreClient\Model\DocumentResponse ``` ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OmsorgCoreClient\Api\DocumentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = 'id_example'; // string $update_document_request = new \OmsorgCoreClient\Model\UpdateDocumentRequest(); // \OmsorgCoreClient\Model\UpdateDocumentRequest try { $result = $apiInstance->apiDocumentsIdPut($id, $update_document_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->apiDocumentsIdPut: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **id** | **string**| | | | **update_document_request** | [**\OmsorgCoreClient\Model\UpdateDocumentRequest**](../Model/UpdateDocumentRequest.md)| | [optional] | ### Return type [**\OmsorgCoreClient\Model\DocumentResponse**](../Model/DocumentResponse.md) ### Authorization [Bearer](../../README.md#Bearer) ### HTTP request headers - **Content-Type**: `application/json`, `text/json`, `application/*+json` - **Accept**: `text/plain`, `application/json`, `text/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) ## `apiDocumentsPost()` ```php apiDocumentsPost($entity_type, $entity_id, $category, $description, $file): \OmsorgCoreClient\Model\DocumentResponse ``` ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OmsorgCoreClient\Api\DocumentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $entity_type = 'entity_type_example'; // string $entity_id = 'entity_id_example'; // string $category = 'category_example'; // string $description = 'description_example'; // string $file = '/path/to/file.txt'; // \SplFileObject try { $result = $apiInstance->apiDocumentsPost($entity_type, $entity_id, $category, $description, $file); print_r($result); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->apiDocumentsPost: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **entity_type** | **string**| | [optional] | | **entity_id** | **string**| | [optional] | | **category** | **string**| | [optional] | | **description** | **string**| | [optional] | | **file** | **\SplFileObject****\SplFileObject**| | [optional] | ### Return type [**\OmsorgCoreClient\Model\DocumentResponse**](../Model/DocumentResponse.md) ### Authorization [Bearer](../../README.md#Bearer) ### HTTP request headers - **Content-Type**: `multipart/form-data` - **Accept**: `text/plain`, `application/json`, `text/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md)