|
| 1 | +# ksapi.BulkDownloadApi |
| 2 | + |
| 3 | +All URIs are relative to *http://localhost:8000* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**start_bulk_download**](BulkDownloadApi.md#start_bulk_download) | **POST** /v1/bulk-download | Start Bulk Download Handler |
| 8 | + |
| 9 | + |
| 10 | +# **start_bulk_download** |
| 11 | +> bytes start_bulk_download(bulk_download_request) |
| 12 | +
|
| 13 | +Start Bulk Download Handler |
| 14 | + |
| 15 | +Package the selected folders/documents into one ``.zip`` and stream it. |
| 16 | + |
| 17 | +Folders are enumerated recursively; trashed and unreadable items are |
| 18 | +excluded, and each included file is recorded as a ``document.downloaded`` |
| 19 | +audit event. The selection is capped — exceeding it returns ``400``. Files |
| 20 | +that cannot be included (no source, still ingesting) are skipped; the count |
| 21 | +is returned in the ``X-Bulk-Download-Skipped`` header. |
| 22 | + |
| 23 | +### Example |
| 24 | + |
| 25 | +* Api Key Authentication (cookieAuth): |
| 26 | +* Bearer Authentication (bearerAuth): |
| 27 | + |
| 28 | +```python |
| 29 | +import ksapi |
| 30 | +from ksapi.models.bulk_download_request import BulkDownloadRequest |
| 31 | +from ksapi.rest import ApiException |
| 32 | +from pprint import pprint |
| 33 | + |
| 34 | +# Defining the host is optional and defaults to http://localhost:8000 |
| 35 | +# See configuration.py for a list of all supported configuration parameters. |
| 36 | +configuration = ksapi.Configuration( |
| 37 | + host = "http://localhost:8000" |
| 38 | +) |
| 39 | + |
| 40 | +# The client must configure the authentication and authorization parameters |
| 41 | +# in accordance with the API server security policy. |
| 42 | +# Examples for each auth method are provided below, use the example that |
| 43 | +# satisfies your auth use case. |
| 44 | + |
| 45 | +# Configure API key authorization: cookieAuth |
| 46 | +configuration.api_key['cookieAuth'] = os.environ["API_KEY"] |
| 47 | + |
| 48 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 49 | +# configuration.api_key_prefix['cookieAuth'] = 'Bearer' |
| 50 | + |
| 51 | +# Configure Bearer authorization: bearerAuth |
| 52 | +configuration = ksapi.Configuration( |
| 53 | + access_token = os.environ["BEARER_TOKEN"] |
| 54 | +) |
| 55 | + |
| 56 | +# Enter a context with an instance of the API client |
| 57 | +with ksapi.ApiClient(configuration) as api_client: |
| 58 | + # Create an instance of the API class |
| 59 | + api_instance = ksapi.BulkDownloadApi(api_client) |
| 60 | + bulk_download_request = ksapi.BulkDownloadRequest() # BulkDownloadRequest | |
| 61 | + |
| 62 | + try: |
| 63 | + # Start Bulk Download Handler |
| 64 | + api_response = api_instance.start_bulk_download(bulk_download_request) |
| 65 | + print("The response of BulkDownloadApi->start_bulk_download:\n") |
| 66 | + pprint(api_response) |
| 67 | + except Exception as e: |
| 68 | + print("Exception when calling BulkDownloadApi->start_bulk_download: %s\n" % e) |
| 69 | +``` |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +### Parameters |
| 74 | + |
| 75 | + |
| 76 | +Name | Type | Description | Notes |
| 77 | +------------- | ------------- | ------------- | ------------- |
| 78 | + **bulk_download_request** | [**BulkDownloadRequest**](BulkDownloadRequest.md)| | |
| 79 | + |
| 80 | +### Return type |
| 81 | + |
| 82 | +**bytes** |
| 83 | + |
| 84 | +### Authorization |
| 85 | + |
| 86 | +[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth) |
| 87 | + |
| 88 | +### HTTP request headers |
| 89 | + |
| 90 | + - **Content-Type**: application/json |
| 91 | + - **Accept**: application/zip, application/json |
| 92 | + |
| 93 | +### HTTP response details |
| 94 | + |
| 95 | +| Status code | Description | Response headers | |
| 96 | +|-------------|-------------|------------------| |
| 97 | +**200** | A ZIP archive of the selected documents. | - | |
| 98 | +**422** | Validation Error | - | |
| 99 | +**0** | Error response. | - | |
| 100 | + |
| 101 | +[[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) |
| 102 | + |
0 commit comments