View on GitHub

lakeFS

Git-like capabilities for your object storage

lakefs_client.RepositoriesApi

All URIs are relative to http://localhost/api/v1

Method HTTP request Description
create_branch_protection_rule POST /repositories/{repository}/branch_protection  
create_repository POST /repositories create repository
delete_branch_protection_rule DELETE /repositories/{repository}/branch_protection  
delete_repository DELETE /repositories/{repository} delete repository
get_branch_protection_rules GET /repositories/{repository}/branch_protection get branch protection rules
get_repository GET /repositories/{repository} get repository
list_repositories GET /repositories list repositories

create_branch_protection_rule

create_branch_protection_rule(repository, branch_protection_rule)

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.error import Error
from lakefs_client.model.branch_protection_rule import BranchProtectionRule
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    repository = "repository_example" # str | 
    branch_protection_rule = BranchProtectionRule(
        pattern="stable_*",
    ) # BranchProtectionRule | 

    # example passing only required values which don't have defaults set
    try:
        api_instance.create_branch_protection_rule(repository, branch_protection_rule)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->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, jwt_token, oidc_auth

HTTP request headers

HTTP response details

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

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

create_repository

Repository create_repository(repository_creation)

create repository

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.repository import Repository
from lakefs_client.model.error import Error
from lakefs_client.model.repository_creation import RepositoryCreation
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    repository_creation = RepositoryCreation(
        name="wr1c2v7s6djuy1zmeto",
        storage_namespace="s3://example-bucket/",
        default_branch="main",
    ) # RepositoryCreation | 
    bare = False # bool | If true, create a bare repository with no initial commit and branch (optional) if omitted the server will use the default value of False

    # example passing only required values which don't have defaults set
    try:
        # create repository
        api_response = api_instance.create_repository(repository_creation)
        pprint(api_response)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->create_repository: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # create repository
        api_response = api_instance.create_repository(repository_creation, bare=bare)
        pprint(api_response)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->create_repository: %s\n" % e)

Parameters

Name Type Description Notes
repository_creation RepositoryCreation    
bare bool If true, create a bare repository with no initial commit and branch [optional] if omitted the server will use the default value of False

Return type

Repository

Authorization

basic_auth, cookie_auth, jwt_token, oidc_auth

HTTP request headers

HTTP response details

Status code Description Response headers
201 repository -
400 Validation Error -
401 Unauthorized -
409 Resource Conflicts With Target -
0 Internal Server Error -

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

delete_branch_protection_rule

delete_branch_protection_rule(repository, inline_object1)

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.error import Error
from lakefs_client.model.inline_object1 import InlineObject1
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    repository = "repository_example" # str | 
    inline_object1 = InlineObject1(
        pattern="pattern_example",
    ) # InlineObject1 | 

    # example passing only required values which don't have defaults set
    try:
        api_instance.delete_branch_protection_rule(repository, inline_object1)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->delete_branch_protection_rule: %s\n" % e)

Parameters

Name Type Description Notes
repository str    
inline_object1 InlineObject1    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, jwt_token, oidc_auth

HTTP request headers

HTTP response details

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

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

delete_repository

delete_repository(repository)

delete repository

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.error import Error
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    repository = "repository_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        # delete repository
        api_instance.delete_repository(repository)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->delete_repository: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

void (empty response body)

Authorization

basic_auth, cookie_auth, jwt_token, oidc_auth

HTTP request headers

HTTP response details

Status code Description Response headers
204 repository deleted successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -

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

get_branch_protection_rules

[BranchProtectionRule] get_branch_protection_rules(repository)

get branch protection rules

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.error import Error
from lakefs_client.model.branch_protection_rule import BranchProtectionRule
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    repository = "repository_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        # get branch protection rules
        api_response = api_instance.get_branch_protection_rules(repository)
        pprint(api_response)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->get_branch_protection_rules: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

[BranchProtectionRule]

Authorization

basic_auth, cookie_auth, jwt_token, oidc_auth

HTTP request headers

HTTP response details

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

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

get_repository

Repository get_repository(repository)

get repository

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.repository import Repository
from lakefs_client.model.error import Error
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    repository = "repository_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        # get repository
        api_response = api_instance.get_repository(repository)
        pprint(api_response)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->get_repository: %s\n" % e)

Parameters

Name Type Description Notes
repository str    

Return type

Repository

Authorization

basic_auth, cookie_auth, jwt_token, oidc_auth

HTTP request headers

HTTP response details

Status code Description Response headers
200 repository -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -

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

list_repositories

RepositoryList list_repositories()

list repositories

Example

import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.repository_list import RepositoryList
from lakefs_client.model.error import Error
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_client.Configuration(
    host = "http://localhost/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_client.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'

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

# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with lakefs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = repositories_api.RepositoriesApi(api_client)
    prefix = "prefix_example" # str | return items prefixed with this value (optional)
    after = "after_example" # str | return items after this value (optional)
    amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # list repositories
        api_response = api_instance.list_repositories(prefix=prefix, after=after, amount=amount)
        pprint(api_response)
    except lakefs_client.ApiException as e:
        print("Exception when calling RepositoriesApi->list_repositories: %s\n" % e)

Parameters

Name Type Description Notes
prefix str return items prefixed with this value [optional]
after str return items after this value [optional]
amount int how many items to return [optional] if omitted the server will use the default value of 100

Return type

RepositoryList

Authorization

basic_auth, cookie_auth, jwt_token, oidc_auth

HTTP request headers

HTTP response details

Status code Description Response headers
200 repository list -
401 Unauthorized -
0 Internal Server Error -

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