lakefs_client.InternalApi
All URIs are relative to http://localhost/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_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
- 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 internal_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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
# example passing only required values which don't have defaults set
try:
api_instance.create_branch_protection_rule_preflight(repository)
except lakefs_client.ApiException 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, 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 | 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
- 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 internal_api
from lakefs_client.model.commit_record_creation import CommitRecordCreation
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
commit_record_creation = CommitRecordCreation(
commit_id="commit_id_example",
version=0,
committer="committer_example",
message="message_example",
metarange_id="metarange_id_example",
creation_date=1,
parents=[
"parents_example",
],
metadata={
"key": "key_example",
},
generation=1,
force=False,
) # CommitRecordCreation |
# example passing only required values which don't have defaults set
try:
# create commit record
api_instance.create_commit_record(repository, commit_record_creation)
except lakefs_client.ApiException 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, 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 | 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)
creates symlink files corresponding to the given directory
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 internal_api
from lakefs_client.model.error import Error
from lakefs_client.model.storage_uri import StorageURI
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
location = "location_example" # str | path to the table data (optional)
# example passing only required values which don't have defaults set
try:
# creates symlink files corresponding to the given directory
api_response = api_instance.create_symlink_file(repository, branch)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->create_symlink_file: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# creates symlink files corresponding to the given directory
api_response = api_instance.create_symlink_file(repository, branch, location=location)
pprint(api_response)
except lakefs_client.ApiException 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
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 |
---|---|---|
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
- 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 internal_api
from lakefs_client.model.repository_metadata_keys import RepositoryMetadataKeys
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
repository_metadata_keys = RepositoryMetadataKeys(
keys=[
"keys_example",
],
) # RepositoryMetadataKeys |
# example passing only required values which don't have defaults set
try:
# delete repository metadata
api_instance.delete_repository_metadata(repository, repository_metadata_keys)
except lakefs_client.ApiException 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, 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 | 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
- 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 internal_api
from lakefs_client.model.refs_dump import RefsDump
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
# example passing only required values which don't have defaults set
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)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->dump_refs: %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 |
---|---|---|
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 lakefs_client
from lakefs_client.api import internal_api
from lakefs_client.model.error import Error
from lakefs_client.model.auth_capabilities import AuthCapabilities
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"
)
# Enter a context with an instance of the API client
with lakefs_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = internal_api.InternalApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# list authentication capabilities supported
api_response = api_instance.get_auth_capabilities()
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->get_auth_capabilities: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
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
- 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 internal_api
from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig
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 = internal_api.InternalApi(api_client)
# example, this endpoint has no required or optional parameters
try:
api_response = api_instance.get_garbage_collection_config()
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->get_garbage_collection_config: %s\n" % e)
Parameters
This endpoint does not need any parameter.
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 | 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
- 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 internal_api
from lakefs_client.model.version_config import VersionConfig
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 = internal_api.InternalApi(api_client)
# example, this endpoint has no required or optional parameters
try:
api_response = api_instance.get_lake_fs_version()
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->get_lake_fs_version: %s\n" % e)
Parameters
This endpoint does not need any parameter.
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 | lakeFS version | - |
401 | Unauthorized | - |
[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 lakefs_client
from lakefs_client.api import internal_api
from lakefs_client.model.error import Error
from lakefs_client.model.setup_state import SetupState
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"
)
# Enter a context with an instance of the API client
with lakefs_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = internal_api.InternalApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# check if the lakeFS installation is already set up
api_response = api_instance.get_setup_state()
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->get_setup_state: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
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
- 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 internal_api
from lakefs_client.model.error import Error
from lakefs_client.model.storage_config import StorageConfig
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 = internal_api.InternalApi(api_client)
# example, this endpoint has no required or optional parameters
try:
api_response = api_instance.get_storage_config()
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->get_storage_config: %s\n" % e)
Parameters
This endpoint does not need any parameter.
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 | 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
- 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 internal_api
from lakefs_client.model.installation_usage_report import InstallationUsageReport
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 = internal_api.InternalApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# get usage report summary
api_response = api_instance.get_usage_report_summary()
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->get_usage_report_summary: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/text
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
- 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 internal_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 = internal_api.InternalApi(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.internal_create_branch_protection_rule(repository, branch_protection_rule)
except lakefs_client.ApiException 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, 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 | - |
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, inline_object1)
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 internal_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'
# 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 = internal_api.InternalApi(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.internal_delete_branch_protection_rule(repository, inline_object1)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->internal_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, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
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
- 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 internal_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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
# example passing only required values which don't have defaults set
try:
api_instance.internal_delete_garbage_collection_rules(repository)
except lakefs_client.ApiException 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, 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 | - |
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
[BranchProtectionRule] internal_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 internal_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 = internal_api.InternalApi(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.internal_get_branch_protection_rules(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->internal_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 | - |
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
- 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 internal_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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
# example passing only required values which don't have defaults set
try:
api_response = api_instance.internal_get_garbage_collection_rules(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->internal_get_garbage_collection_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 | 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
- 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 internal_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 = internal_api.InternalApi(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.internal_set_garbage_collection_rules(repository, garbage_collection_rules)
except lakefs_client.ApiException 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, 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 | - |
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
- 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 internal_api
from lakefs_client.model.error import Error
from lakefs_client.model.stats_events_list import StatsEventsList
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 = internal_api.InternalApi(api_client)
stats_events_list = StatsEventsList(
events=[
StatsEvent(
_class="_class_example",
name="name_example",
count=1,
),
],
) # StatsEventsList |
# example passing only required values which don't have defaults set
try:
# post stats events, this endpoint is meant for internal use only
api_instance.post_stats_events(stats_events_list)
except lakefs_client.ApiException 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, 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 | 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
- 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 internal_api
from lakefs_client.model.error import Error
from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
# example passing only required values which don't have defaults set
try:
# save lists of active commits for garbage collection
api_response = api_instance.prepare_garbage_collection_commits(repository)
pprint(api_response)
except lakefs_client.ApiException 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, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
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)
save repository uncommitted metadata for garbage collection
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 internal_api
from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse
from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
prepare_gc_uncommitted_request = PrepareGCUncommittedRequest(
continuation_token="continuation_token_example",
) # PrepareGCUncommittedRequest | (optional)
# example passing only required values which don't have defaults set
try:
# save repository uncommitted metadata for garbage collection
api_response = api_instance.prepare_garbage_collection_uncommitted(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->prepare_garbage_collection_uncommitted: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
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)
pprint(api_response)
except lakefs_client.ApiException 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
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 | 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
- 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 internal_api
from lakefs_client.model.refs_restore import RefsRestore
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 = internal_api.InternalApi(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 refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations
api_instance.restore_refs(repository, refs_restore)
except lakefs_client.ApiException 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, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
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
- 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 internal_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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
# example passing only required values which don't have defaults set
try:
api_instance.set_garbage_collection_rules_preflight(repository)
except lakefs_client.ApiException 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, 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 | 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
- 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 internal_api
from lakefs_client.model.repository_metadata_set import RepositoryMetadataSet
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
repository_metadata_set = RepositoryMetadataSet(
metadata={
"key": "key_example",
},
) # RepositoryMetadataSet |
# example passing only required values which don't have defaults set
try:
# set repository metadata
api_instance.set_repository_metadata(repository, repository_metadata_set)
except lakefs_client.ApiException 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, 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 | 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 lakefs_client
from lakefs_client.api import internal_api
from lakefs_client.model.credentials_with_secret import CredentialsWithSecret
from lakefs_client.model.setup import Setup
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"
)
# Enter a context with an instance of the API client
with lakefs_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = internal_api.InternalApi(api_client)
setup = Setup(
username="username_example",
key=AccessKeyCredentials(
access_key_id="AKIAIOSFODNN7EXAMPLE",
secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
),
) # Setup |
# example passing only required values which don't have defaults set
try:
# setup lakeFS and create a first user
api_response = api_instance.setup(setup)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling InternalApi->setup: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
setup | Setup |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
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 lakefs_client
from lakefs_client.api import internal_api
from lakefs_client.model.comm_prefs_input import CommPrefsInput
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"
)
# Enter a context with an instance of the API client
with lakefs_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = internal_api.InternalApi(api_client)
comm_prefs_input = CommPrefsInput(
email="email_example",
feature_updates=True,
security_updates=True,
) # CommPrefsInput |
# example passing only required values which don't have defaults set
try:
# setup communications preferences
api_instance.setup_comm_prefs(comm_prefs_input)
except lakefs_client.ApiException 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
- Content-Type: application/json
- Accept: application/json
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
- 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 internal_api
from lakefs_client.model.object_stage_creation import ObjectStageCreation
from lakefs_client.model.error import Error
from lakefs_client.model.object_stats import ObjectStats
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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
path = "path_example" # str | relative to the branch
object_stage_creation = ObjectStageCreation(
physical_address="physical_address_example",
checksum="checksum_example",
size_bytes=1,
mtime=1,
metadata=ObjectUserMetadata(
key="key_example",
),
content_type="content_type_example",
force=False,
) # ObjectStageCreation |
# example passing only required values which don't have defaults set
try:
# stage an object's metadata for the given branch
api_response = api_instance.stage_object(repository, branch, path, object_stage_creation)
pprint(api_response)
except lakefs_client.ApiException 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
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 | 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
- 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 internal_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 = internal_api.InternalApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
path = "path_example" # str | relative to the branch
# example passing only required values which don't have defaults set
try:
api_instance.upload_object_preflight(repository, branch, path)
except lakefs_client.ApiException 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, 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 | 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]