Skip to content

Latest commit

 

History

History
295 lines (196 loc) · 14.4 KB

File metadata and controls

295 lines (196 loc) · 14.4 KB

Storage

Overview

Available Operations

create_storage_file

Create a file

Example Usage

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)

Parameters

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.

Response

operations.CreateStorageFileResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get_storage_file

Retrieve a file

Example Usage

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)

Parameters

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.

Response

operations.GetStorageFileResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

list_storage_files

List all files

Example Usage

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)

Parameters

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.

Response

operations.ListStorageFilesResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

patch_storage_file

Update a file

Example Usage

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)

Parameters

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.

Response

operations.PatchStorageFileResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

remove_storage_file

Remove a file

Example Usage

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)

Parameters

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.

Response

operations.RemoveStorageFileResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

update_storage_file

Update a file

Example Usage

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)

Parameters

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.

Response

operations.UpdateStorageFileResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*