lakefs_client.RepositoriesApi
All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_repository | POST /repositories | create repository |
delete_gc_rules | DELETE /repositories/{repository}/settings/gc_rules | |
delete_repository | DELETE /repositories/{repository} | delete repository |
dump_status | GET /repositories/{repository}/dump | Status of a repository dump task |
dump_submit | POST /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store. |
get_branch_protection_rules | GET /repositories/{repository}/settings/branch_protection | get branch protection rules |
get_gc_rules | GET /repositories/{repository}/settings/gc_rules | get repository GC rules |
get_repository | GET /repositories/{repository} | get repository |
get_repository_metadata | GET /repositories/{repository}/metadata | get repository metadata |
list_repositories | GET /repositories | list repositories |
restore_status | GET /repositories/{repository}/restore | Status of a restore request |
restore_submit | POST /repositories/{repository}/restore | Restore repository from a dump in the object store |
set_branch_protection_rules | PUT /repositories/{repository}/settings/branch_protection | |
set_gc_rules | PUT /repositories/{repository}/settings/gc_rules |
create_repository
Repository create_repository(repository_creation)
create repository
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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",
sample_data=True,
read_only=True,
) # 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
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | repository | - |
400 | Validation Error | - |
401 | Unauthorized | - |
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]
delete_gc_rules
delete_gc_rules(repository)
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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:
api_instance.delete_gc_rules(repository)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->delete_gc_rules: %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, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | deleted garbage collection rules successfully | - |
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]
delete_repository
delete_repository(repository)
delete repository
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 |
force = False # bool | Bypass read-only protection and delete the repository (optional) if omitted the server will use the default value of False
# 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)
# example passing only required values which don't have defaults set
# and optional values
try:
# delete repository
api_instance.delete_repository(repository, force=force)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->delete_repository: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
force | bool | Bypass read-only protection and delete the repository | [optional] if omitted the server will use the default value of False |
Return type
void (empty response body)
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | repository 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]
dump_status
RepositoryDumpStatus dump_status(repository, task_id)
Status of a repository dump task
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.repository_dump_status import RepositoryDumpStatus
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 |
task_id = "task_id_example" # str |
# example passing only required values which don't have defaults set
try:
# Status of a repository dump task
api_response = api_instance.dump_status(repository, task_id)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->dump_status: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
task_id | str |
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | dump task status | - |
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]
dump_submit
TaskInfo dump_submit(repository)
Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.error import Error
from lakefs_client.model.task_info import TaskInfo
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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:
# Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
api_response = api_instance.dump_submit(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->dump_submit: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str |
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | dump task information | - |
400 | Validation Error | - |
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
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | branch protection rules | * ETag - |
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_gc_rules
GarbageCollectionRules get_gc_rules(repository)
get repository GC rules
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 GC rules
api_response = api_instance.get_gc_rules(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->get_gc_rules: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str |
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | repository GC 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]
get_repository
Repository get_repository(repository)
get repository
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | 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]
get_repository_metadata
RepositoryMetadata get_repository_metadata(repository)
get repository metadata
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.repository_metadata import RepositoryMetadata
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 metadata
api_response = api_instance.get_repository_metadata(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->get_repository_metadata: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str |
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | repository metadata | - |
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]
list_repositories
RepositoryList list_repositories()
list repositories
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | repository list | - |
401 | Unauthorized | - |
420 | too many requests | - |
0 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
restore_status
RepositoryRestoreStatus restore_status(repository, task_id)
Status of a restore request
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.repository_restore_status import RepositoryRestoreStatus
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 |
task_id = "task_id_example" # str |
# example passing only required values which don't have defaults set
try:
# Status of a restore request
api_response = api_instance.restore_status(repository, task_id)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->restore_status: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
task_id | str |
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | restore task status | - |
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]
restore_submit
TaskInfo restore_submit(repository, refs_restore)
Restore repository from a dump in the object store
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.refs_restore import RefsRestore
from lakefs_client.model.error import Error
from lakefs_client.model.task_info import TaskInfo
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 |
refs_restore = RefsRestore(
commits_meta_range_id="commits_meta_range_id_example",
tags_meta_range_id="tags_meta_range_id_example",
branches_meta_range_id="branches_meta_range_id_example",
force=False,
) # RefsRestore |
# example passing only required values which don't have defaults set
try:
# Restore repository from a dump in the object store
api_response = api_instance.restore_submit(repository, refs_restore)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->restore_submit: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
refs_restore | RefsRestore |
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | restore task created | - |
400 | Validation Error | - |
403 | Forbidden | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
0 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
set_branch_protection_rules
set_branch_protection_rules(repository, branch_protection_rule)
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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] |
if_match = "If-Match_example" # str | if provided, the branch protection rules will be updated only if the current ETag match the provided value (optional)
# example passing only required values which don't have defaults set
try:
api_instance.set_branch_protection_rules(repository, branch_protection_rule)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->set_branch_protection_rules: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
api_instance.set_branch_protection_rules(repository, branch_protection_rule, if_match=if_match)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->set_branch_protection_rules: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch_protection_rule | [BranchProtectionRule] | ||
if_match | str | if provided, the branch protection rules will be updated only if the current ETag match the provided value | [optional] |
Return type
void (empty response body)
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | branch protection rule created successfully | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
412 | Precondition Failed | - |
420 | too many requests | - |
0 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
set_gc_rules
set_gc_rules(repository, garbage_collection_rules)
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Bearer (JWT) Authentication (jwt_token):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
import time
import lakefs_client
from lakefs_client.api import repositories_api
from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules
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'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_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 |
garbage_collection_rules = GarbageCollectionRules(
default_retention_days=1,
branches=[
GarbageCollectionRule(
branch_id="branch_id_example",
retention_days=1,
),
],
) # GarbageCollectionRules |
# example passing only required values which don't have defaults set
try:
api_instance.set_gc_rules(repository, garbage_collection_rules)
except lakefs_client.ApiException as e:
print("Exception when calling RepositoriesApi->set_gc_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, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | set garbage collection rules successfully | - |
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]