- create_storage_file - Create a file
- get_storage_file - Retrieve a file
- list_storage_files - List all files
- patch_storage_file - Update a file
- remove_storage_file - Remove a file
- update_storage_file - Update a file
Create a file
from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared
with UnifiedTo(
security=shared.Security(
jwt="<YOUR_API_KEY_HERE>",
),
) as unified_to:
res = unified_to.storage.create_storage_file(request={
"storage_file": {},
"connection_id": "<id>",
})
assert res.storage_file is not None
# Handle response
print(res.storage_file)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreateStorageFileRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.CreateStorageFileResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
Retrieve a file
from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared
with UnifiedTo(
security=shared.Security(
jwt="<YOUR_API_KEY_HERE>",
),
) as unified_to:
res = unified_to.storage.get_storage_file(request={
"connection_id": "<id>",
"id": "<id>",
})
assert res.storage_file is not None
# Handle response
print(res.storage_file)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetStorageFileRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetStorageFileResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
List all files
from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared
with UnifiedTo(
security=shared.Security(
jwt="<YOUR_API_KEY_HERE>",
),
) as unified_to:
res = unified_to.storage.list_storage_files(request={
"connection_id": "<id>",
})
assert res.storage_files is not None
# Handle response
print(res.storage_files)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListStorageFilesRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.ListStorageFilesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
Update a file
from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared
with UnifiedTo(
security=shared.Security(
jwt="<YOUR_API_KEY_HERE>",
),
) as unified_to:
res = unified_to.storage.patch_storage_file(request={
"storage_file": {},
"connection_id": "<id>",
"id": "<id>",
})
assert res.storage_file is not None
# Handle response
print(res.storage_file)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PatchStorageFileRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.PatchStorageFileResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
Remove a file
from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared
with UnifiedTo(
security=shared.Security(
jwt="<YOUR_API_KEY_HERE>",
),
) as unified_to:
res = unified_to.storage.remove_storage_file(request={
"connection_id": "<id>",
"id": "<id>",
})
assert res is not None
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.RemoveStorageFileRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.RemoveStorageFileResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
Update a file
from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared
with UnifiedTo(
security=shared.Security(
jwt="<YOUR_API_KEY_HERE>",
),
) as unified_to:
res = unified_to.storage.update_storage_file(request={
"storage_file": {},
"connection_id": "<id>",
"id": "<id>",
})
assert res.storage_file is not None
# Handle response
print(res.storage_file)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateStorageFileRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.UpdateStorageFileResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |