lakefs_client.BranchesApi
All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
cherry_pick | POST /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch |
create_branch | POST /repositories/{repository}/branches | create branch |
delete_branch | DELETE /repositories/{repository}/branches/{branch} | delete branch |
diff_branch | GET /repositories/{repository}/branches/{branch}/diff | diff branch |
get_branch | GET /repositories/{repository}/branches/{branch} | get branch |
list_branches | GET /repositories/{repository}/branches | list branches |
reset_branch | PUT /repositories/{repository}/branches/{branch} | reset branch |
revert_branch | POST /repositories/{repository}/branches/{branch}/revert | revert |
cherry_pick
Commit cherry_pick(repository, branch, cherry_pick_creation)
Replay the changes from the given commit on the 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 branches_api
from lakefs_client.model.commit import Commit
from lakefs_client.model.error import Error
from lakefs_client.model.cherry_pick_creation import CherryPickCreation
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
cherry_pick_creation = CherryPickCreation(
ref="ref_example",
parent_number=1,
commit_overrides=CommitOverrides(
message="message_example",
metadata={
"key": "key_example",
},
),
force=False,
) # CherryPickCreation |
# example passing only required values which don't have defaults set
try:
# Replay the changes from the given commit on the branch
api_response = api_instance.cherry_pick(repository, branch, cherry_pick_creation)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->cherry_pick: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch | str | ||
cherry_pick_creation | CherryPickCreation |
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 | the cherry-pick commit | - |
400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
409 | Conflict Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
create_branch
str create_branch(repository, branch_creation)
create 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 branches_api
from lakefs_client.model.branch_creation import BranchCreation
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch_creation = BranchCreation(
name="name_example",
source="source_example",
force=False,
) # BranchCreation |
# example passing only required values which don't have defaults set
try:
# create branch
api_response = api_instance.create_branch(repository, branch_creation)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->create_branch: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch_creation | BranchCreation |
Return type
str
Authorization
basic_auth, cookie_auth, jwt_token, oidc_auth, saml_auth
HTTP request headers
- Content-Type: application/json
- Accept: text/html, application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | reference | - |
400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
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]
delete_branch
delete_branch(repository, branch)
delete 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 branches_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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
force = False # bool | (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 branch
api_instance.delete_branch(repository, branch)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->delete_branch: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# delete branch
api_instance.delete_branch(repository, branch, force=force)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->delete_branch: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch | str | ||
force | bool | [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 | branch deleted 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]
diff_branch
DiffList diff_branch(repository, branch)
diff 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 branches_api
from lakefs_client.model.diff_list import DiffList
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
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
prefix = "prefix_example" # str | return items prefixed with this value (optional)
delimiter = "delimiter_example" # str | delimiter used to group common prefixes by (optional)
# example passing only required values which don't have defaults set
try:
# diff branch
api_response = api_instance.diff_branch(repository, branch)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->diff_branch: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# diff branch
api_response = api_instance.diff_branch(repository, branch, after=after, amount=amount, prefix=prefix, delimiter=delimiter)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->diff_branch: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch | str | ||
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 |
prefix | str | return items prefixed with this value | [optional] |
delimiter | str | delimiter used to group common prefixes by | [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 |
---|---|---|
200 | diff of branch uncommitted changes | - |
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_branch
Ref get_branch(repository, branch)
get 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 branches_api
from lakefs_client.model.error import Error
from lakefs_client.model.ref import Ref
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
# example passing only required values which don't have defaults set
try:
# get branch
api_response = api_instance.get_branch(repository, branch)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->get_branch: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch | 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 | - |
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_branches
RefList list_branches(repository)
list branches
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 branches_api
from lakefs_client.model.error import Error
from lakefs_client.model.ref_list import RefList
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
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
try:
# list branches
api_response = api_instance.list_branches(repository)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->list_branches: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# list branches
api_response = api_instance.list_branches(repository, prefix=prefix, after=after, amount=amount)
pprint(api_response)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->list_branches: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
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 | branch 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]
reset_branch
reset_branch(repository, branch, reset_creation)
reset 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 branches_api
from lakefs_client.model.reset_creation import ResetCreation
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
reset_creation = ResetCreation(
type="object",
path="path_example",
force=False,
) # ResetCreation |
# example passing only required values which don't have defaults set
try:
# reset branch
api_instance.reset_branch(repository, branch, reset_creation)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->reset_branch: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch | str | ||
reset_creation | ResetCreation |
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 | reset successful | - |
400 | Bad Request | - |
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]
revert_branch
revert_branch(repository, branch, revert_creation)
revert
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 branches_api
from lakefs_client.model.revert_creation import RevertCreation
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 = branches_api.BranchesApi(api_client)
repository = "repository_example" # str |
branch = "branch_example" # str |
revert_creation = RevertCreation(
ref="ref_example",
commit_overrides=CommitOverrides(
message="message_example",
metadata={
"key": "key_example",
},
),
parent_number=1,
force=False,
allow_empty=False,
) # RevertCreation |
# example passing only required values which don't have defaults set
try:
# revert
api_instance.revert_branch(repository, branch, revert_creation)
except lakefs_client.ApiException as e:
print("Exception when calling BranchesApi->revert_branch: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
branch | str | ||
revert_creation | RevertCreation |
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 | revert successful | - |
400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
409 | Conflict Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]