View on GitHub

lakeFS

lakeFS - Data version control for your data lake | Git for data

lakefs_sdk.InternalApi

All URIs are relative to /api/v1

Method HTTP request Description
create_branch_protection_rule_preflight GET /repositories/{repository}/branch_protection/set_allowed  
create_commit_record POST /repositories/{repository}/commits create commit record
create_symlink_file POST /repositories/{repository}/refs/{branch}/symlink creates symlink files corresponding to the given directory
delete_repository_metadata DELETE /repositories/{repository}/metadata delete repository metadata
dump_refs PUT /repositories/{repository}/refs/dump Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations
get_auth_capabilities GET /auth/capabilities list authentication capabilities supported
get_garbage_collection_config GET /config/garbage-collection  
get_lake_fs_version GET /config/version  
get_metadata_object GET /repositories/{repository}/metadata/object/{type}/{object_id} return a lakeFS metadata object by ID
get_setup_state GET /setup_lakefs check if the lakeFS installation is already set up
get_storage_config GET /config/storage  
get_usage_report_summary GET /usage-report/summary get usage report summary
internal_create_branch_protection_rule POST /repositories/{repository}/branch_protection  
internal_delete_branch_protection_rule DELETE /repositories/{repository}/branch_protection  
internal_delete_garbage_collection_rules DELETE /repositories/{repository}/gc/rules  
internal_get_branch_protection_rules GET /repositories/{repository}/branch_protection get branch protection rules
internal_get_garbage_collection_rules GET /repositories/{repository}/gc/rules  
internal_set_garbage_collection_rules POST /repositories/{repository}/gc/rules  
post_stats_events POST /statistics post stats events, this endpoint is meant for internal use only
prepare_garbage_collection_commits POST /repositories/{repository}/gc/prepare_commits save lists of active commits for garbage collection
prepare_garbage_collection_uncommitted POST /repositories/{repository}/gc/prepare_uncommited save repository uncommitted metadata for garbage collection
restore_refs PUT /repositories/{repository}/refs/restore Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations
set_garbage_collection_rules_preflight GET /repositories/{repository}/gc/rules/set_allowed  
set_repository_metadata POST /repositories/{repository}/metadata set repository metadata
setup POST /setup_lakefs setup lakeFS and create a first user
setup_comm_prefs POST /setup_comm_prefs setup communications preferences
stage_object PUT /repositories/{repository}/branches/{branch}/objects stage an object's metadata for the given branch
upload_object_preflight GET /repositories/{repository}/branches/{branch}/objects/stage_allowed  

create_branch_protection_rule_preflight

create_branch_protection_rule_preflight(repository)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        api_instance.create_branch_protection_rule_preflight(repository)
    except Exception as e:
        print("Exception when calling InternalApi->create_branch_protection_rule_preflight: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 User has permissions to create a branch protection rule in this repository -
401 Unauthorized -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_commit_record

create_commit_record(repository, commit_record_creation)

create commit record

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.commit_record_creation import CommitRecordCreation
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    commit_record_creation = lakefs_sdk.CommitRecordCreation() # CommitRecordCreation | 

    try:
        # create commit record
        api_instance.create_commit_record(repository, commit_record_creation)
    except Exception as e:
        print("Exception when calling InternalApi->create_commit_record: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
commit_record_creation CommitRecordCreation    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 commit record created -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_symlink_file

StorageURI create_symlink_file(repository, branch, location=location)

creates symlink files corresponding to the given directory

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.storage_uri import StorageURI
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    branch = 'branch_example' # str | 
    location = 'location_example' # str | path to the table data (optional)

    try:
        # creates symlink files corresponding to the given directory
        api_response = api_instance.create_symlink_file(repository, branch, location=location)
        print("The response of InternalApi->create_symlink_file:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->create_symlink_file: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
branch str    
location str path to the table data [optional]

Return type

StorageURI

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
201 location created -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_repository_metadata

delete_repository_metadata(repository, repository_metadata_keys)

delete repository metadata

Delete specified keys from the repository’s metadata.

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.repository_metadata_keys import RepositoryMetadataKeys
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    repository_metadata_keys = lakefs_sdk.RepositoryMetadataKeys() # RepositoryMetadataKeys | 

    try:
        # delete repository metadata
        api_instance.delete_repository_metadata(repository, repository_metadata_keys)
    except Exception as e:
        print("Exception when calling InternalApi->delete_repository_metadata: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
repository_metadata_keys RepositoryMetadataKeys    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 repository metadata keys deleted successfully -
401 Unauthorized -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

dump_refs

RefsDump dump_refs(repository)

Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.refs_dump import RefsDump
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        # Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations 
        api_response = api_instance.dump_refs(repository)
        print("The response of InternalApi->dump_refs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->dump_refs: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

RefsDump

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
201 refs dump -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_auth_capabilities

AuthCapabilities get_auth_capabilities()

list authentication capabilities supported

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.auth_capabilities import AuthCapabilities
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)


# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)

    try:
        # list authentication capabilities supported
        api_response = api_instance.get_auth_capabilities()
        print("The response of InternalApi->get_auth_capabilities:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_auth_capabilities: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

AuthCapabilities

Authorization

No authorization required

HTTP request headers

HTTP response details

Status code Description Response headers
200 auth capabilities -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_garbage_collection_config

GarbageCollectionConfig get_garbage_collection_config()

get information of gc settings

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.garbage_collection_config import GarbageCollectionConfig
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)

    try:
        api_response = api_instance.get_garbage_collection_config()
        print("The response of InternalApi->get_garbage_collection_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_garbage_collection_config: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GarbageCollectionConfig

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 lakeFS garbage collection config -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_lake_fs_version

VersionConfig get_lake_fs_version()

get version of lakeFS server

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.version_config import VersionConfig
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)

    try:
        api_response = api_instance.get_lake_fs_version()
        print("The response of InternalApi->get_lake_fs_version:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_lake_fs_version: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

VersionConfig

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 lakeFS version -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_metadata_object

bytearray get_metadata_object(repository, object_id, type, presign=presign)

return a lakeFS metadata object by ID

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    object_id = 'object_id_example' # str | 
    type = 'type_example' # str | 
    presign = True # bool |  (optional)

    try:
        # return a lakeFS metadata object by ID
        api_response = api_instance.get_metadata_object(repository, object_id, type, presign=presign)
        print("The response of InternalApi->get_metadata_object:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_metadata_object: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
object_id str    
type str    
presign bool   [optional]

Return type

bytearray

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 object content * Content-Length -
302 Redirect to a pre-signed URL for the object * Location - redirect to S3
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_setup_state

SetupState get_setup_state()

check if the lakeFS installation is already set up

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.setup_state import SetupState
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)


# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)

    try:
        # check if the lakeFS installation is already set up
        api_response = api_instance.get_setup_state()
        print("The response of InternalApi->get_setup_state:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_setup_state: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

SetupState

Authorization

No authorization required

HTTP request headers

HTTP response details

Status code Description Response headers
200 lakeFS setup state -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_storage_config

StorageConfig get_storage_config()

retrieve lakeFS storage configuration

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.storage_config import StorageConfig
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)

    try:
        api_response = api_instance.get_storage_config()
        print("The response of InternalApi->get_storage_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_storage_config: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

StorageConfig

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 lakeFS storage configuration -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_usage_report_summary

InstallationUsageReport get_usage_report_summary()

get usage report summary

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.installation_usage_report import InstallationUsageReport
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)

    try:
        # get usage report summary
        api_response = api_instance.get_usage_report_summary()
        print("The response of InternalApi->get_usage_report_summary:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->get_usage_report_summary: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InstallationUsageReport

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 Usage report -
400 Bad Request -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

internal_create_branch_protection_rule

internal_create_branch_protection_rule(repository, branch_protection_rule)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.branch_protection_rule import BranchProtectionRule
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    branch_protection_rule = lakefs_sdk.BranchProtectionRule() # BranchProtectionRule | 

    try:
        api_instance.internal_create_branch_protection_rule(repository, branch_protection_rule)
    except Exception as e:
        print("Exception when calling InternalApi->internal_create_branch_protection_rule: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
branch_protection_rule BranchProtectionRule    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 branch protection rule created successfully -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

internal_delete_branch_protection_rule

internal_delete_branch_protection_rule(repository, internal_delete_branch_protection_rule_request)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.internal_delete_branch_protection_rule_request import InternalDeleteBranchProtectionRuleRequest
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    internal_delete_branch_protection_rule_request = lakefs_sdk.InternalDeleteBranchProtectionRuleRequest() # InternalDeleteBranchProtectionRuleRequest | 

    try:
        api_instance.internal_delete_branch_protection_rule(repository, internal_delete_branch_protection_rule_request)
    except Exception as e:
        print("Exception when calling InternalApi->internal_delete_branch_protection_rule: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
internal_delete_branch_protection_rule_request InternalDeleteBranchProtectionRuleRequest    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 branch protection rule deleted successfully -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

internal_delete_garbage_collection_rules

internal_delete_garbage_collection_rules(repository)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        api_instance.internal_delete_garbage_collection_rules(repository)
    except Exception as e:
        print("Exception when calling InternalApi->internal_delete_garbage_collection_rules: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 deleted garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

internal_get_branch_protection_rules

List[BranchProtectionRule] internal_get_branch_protection_rules(repository)

get branch protection rules

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.branch_protection_rule import BranchProtectionRule
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        # get branch protection rules
        api_response = api_instance.internal_get_branch_protection_rules(repository)
        print("The response of InternalApi->internal_get_branch_protection_rules:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->internal_get_branch_protection_rules: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

List[BranchProtectionRule]

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 branch protection rules -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

internal_get_garbage_collection_rules

GarbageCollectionRules internal_get_garbage_collection_rules(repository)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.garbage_collection_rules import GarbageCollectionRules
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        api_response = api_instance.internal_get_garbage_collection_rules(repository)
        print("The response of InternalApi->internal_get_garbage_collection_rules:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->internal_get_garbage_collection_rules: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

GarbageCollectionRules

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 gc rule list -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

internal_set_garbage_collection_rules

internal_set_garbage_collection_rules(repository, garbage_collection_rules)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.garbage_collection_rules import GarbageCollectionRules
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    garbage_collection_rules = lakefs_sdk.GarbageCollectionRules() # GarbageCollectionRules | 

    try:
        api_instance.internal_set_garbage_collection_rules(repository, garbage_collection_rules)
    except Exception as e:
        print("Exception when calling InternalApi->internal_set_garbage_collection_rules: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
garbage_collection_rules GarbageCollectionRules    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 set garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

post_stats_events

post_stats_events(stats_events_list)

post stats events, this endpoint is meant for internal use only

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.stats_events_list import StatsEventsList
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    stats_events_list = lakefs_sdk.StatsEventsList() # StatsEventsList | 

    try:
        # post stats events, this endpoint is meant for internal use only
        api_instance.post_stats_events(stats_events_list)
    except Exception as e:
        print("Exception when calling InternalApi->post_stats_events: %s\n" % e)

Parameters

Name Type Description Notes
stats_events_list StatsEventsList    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 reported successfully -
400 Bad Request -
401 Unauthorized -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

prepare_garbage_collection_commits

GarbageCollectionPrepareResponse prepare_garbage_collection_commits(repository)

save lists of active commits for garbage collection

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.garbage_collection_prepare_response import GarbageCollectionPrepareResponse
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        # save lists of active commits for garbage collection
        api_response = api_instance.prepare_garbage_collection_commits(repository)
        print("The response of InternalApi->prepare_garbage_collection_commits:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->prepare_garbage_collection_commits: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

GarbageCollectionPrepareResponse

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
201 paths to commit dataset -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

prepare_garbage_collection_uncommitted

PrepareGCUncommittedResponse prepare_garbage_collection_uncommitted(repository, prepare_gc_uncommitted_request=prepare_gc_uncommitted_request)

save repository uncommitted metadata for garbage collection

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest
from lakefs_sdk.models.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    prepare_gc_uncommitted_request = lakefs_sdk.PrepareGCUncommittedRequest() # PrepareGCUncommittedRequest |  (optional)

    try:
        # save repository uncommitted metadata for garbage collection
        api_response = api_instance.prepare_garbage_collection_uncommitted(repository, prepare_gc_uncommitted_request=prepare_gc_uncommitted_request)
        print("The response of InternalApi->prepare_garbage_collection_uncommitted:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->prepare_garbage_collection_uncommitted: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
prepare_gc_uncommitted_request PrepareGCUncommittedRequest   [optional]

Return type

PrepareGCUncommittedResponse

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
201 paths to commit dataset -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restore_refs

restore_refs(repository, refs_restore)

Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.refs_restore import RefsRestore
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    refs_restore = lakefs_sdk.RefsRestore() # RefsRestore | 

    try:
        # Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations 
        api_instance.restore_refs(repository, refs_restore)
    except Exception as e:
        print("Exception when calling InternalApi->restore_refs: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
refs_restore RefsRestore    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
200 refs successfully loaded -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_garbage_collection_rules_preflight

set_garbage_collection_rules_preflight(repository)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 

    try:
        api_instance.set_garbage_collection_rules_preflight(repository)
    except Exception as e:
        print("Exception when calling InternalApi->set_garbage_collection_rules_preflight: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 User has permissions to set garbage collection rules on this repository -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_repository_metadata

set_repository_metadata(repository, repository_metadata_set)

set repository metadata

Set repository metadata. This will only add or update the provided keys, and will not remove any existing keys.

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.repository_metadata_set import RepositoryMetadataSet
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    repository_metadata_set = lakefs_sdk.RepositoryMetadataSet() # RepositoryMetadataSet | 

    try:
        # set repository metadata
        api_instance.set_repository_metadata(repository, repository_metadata_set)
    except Exception as e:
        print("Exception when calling InternalApi->set_repository_metadata: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
repository_metadata_set RepositoryMetadataSet    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 repository metadata set successfully -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setup

CredentialsWithSecret setup(setup)

setup lakeFS and create a first user

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.credentials_with_secret import CredentialsWithSecret
from lakefs_sdk.models.setup import Setup
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)


# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    setup = lakefs_sdk.Setup() # Setup | 

    try:
        # setup lakeFS and create a first user
        api_response = api_instance.setup(setup)
        print("The response of InternalApi->setup:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->setup: %s\n" % e)

Parameters

Name Type Description Notes
setup Setup    

Return type

CredentialsWithSecret

Authorization

No authorization required

HTTP request headers

HTTP response details

Status code Description Response headers
200 user created successfully -
400 Bad Request -
409 setup was already called -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setup_comm_prefs

setup_comm_prefs(comm_prefs_input)

setup communications preferences

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.comm_prefs_input import CommPrefsInput
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)


# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    comm_prefs_input = lakefs_sdk.CommPrefsInput() # CommPrefsInput | 

    try:
        # setup communications preferences
        api_instance.setup_comm_prefs(comm_prefs_input)
    except Exception as e:
        print("Exception when calling InternalApi->setup_comm_prefs: %s\n" % e)

Parameters

Name Type Description Notes
comm_prefs_input CommPrefsInput    

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

HTTP response details

Status code Description Response headers
200 communication preferences saved successfully -
409 setup was already completed -
412 wrong setup state for this operation -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

stage_object

ObjectStats stage_object(repository, branch, path, object_stage_creation)

stage an object’s metadata for the given branch

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.models.object_stage_creation import ObjectStageCreation
from lakefs_sdk.models.object_stats import ObjectStats
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    branch = 'branch_example' # str | 
    path = 'path_example' # str | relative to the branch
    object_stage_creation = lakefs_sdk.ObjectStageCreation() # ObjectStageCreation | 

    try:
        # stage an object's metadata for the given branch
        api_response = api_instance.stage_object(repository, branch, path, object_stage_creation)
        print("The response of InternalApi->stage_object:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->stage_object: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
branch str    
path str relative to the branch  
object_stage_creation ObjectStageCreation    

Return type

ObjectStats

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
201 object metadata -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

upload_object_preflight

upload_object_preflight(repository, branch, path)

Example

import time
import os
import lakefs_sdk
from lakefs_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
    host = "/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'

# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lakefs_sdk.InternalApi(api_client)
    repository = 'repository_example' # str | 
    branch = 'branch_example' # str | 
    path = 'path_example' # str | relative to the branch

    try:
        api_instance.upload_object_preflight(repository, branch, path)
    except Exception as e:
        print("Exception when calling InternalApi->upload_object_preflight: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
branch str    
path str relative to the branch  

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token

HTTP request headers

HTTP response details

Status code Description Response headers
204 User has permissions to upload this object. This does not guarantee that the upload will be successful or even possible. It indicates only the permission at the time of calling this endpoint -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]