lakefs_sdk.TagsApi
All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
create_tag | POST /repositories/{repository}/tags | create tag |
delete_tag | DELETE /repositories/{repository}/tags/{tag} | delete tag |
get_tag | GET /repositories/{repository}/tags/{tag} | get tag |
list_tags | GET /repositories/{repository}/tags | list tags |
create_tag
Ref create_tag(repository, tag_creation)
create tag
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
- Bearer (JWT) Authentication (jwt_token):
import time
import os
import lakefs_sdk
from lakefs_sdk.models.ref import Ref
from lakefs_sdk.models.tag_creation import TagCreation
from lakefs_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'
# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.TagsApi(api_client)
repository = 'repository_example' # str |
tag_creation = lakefs_sdk.TagCreation() # TagCreation |
try:
# create tag
api_response = api_instance.create_tag(repository, tag_creation)
print("The response of TagsApi->create_tag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->create_tag: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
tag_creation | TagCreation |
Return type
Authorization
basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | tag | - |
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_tag
delete_tag(repository, tag, force=force)
delete tag
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
- Bearer (JWT) Authentication (jwt_token):
import time
import os
import lakefs_sdk
from lakefs_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'
# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.TagsApi(api_client)
repository = 'repository_example' # str |
tag = 'tag_example' # str |
force = True # bool | (optional)
try:
# delete tag
api_instance.delete_tag(repository, tag, force=force)
except Exception as e:
print("Exception when calling TagsApi->delete_tag: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
tag | str | ||
force | bool | [optional] |
Return type
void (empty response body)
Authorization
basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | tag 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]
get_tag
Ref get_tag(repository, tag)
get tag
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
- Bearer (JWT) Authentication (jwt_token):
import time
import os
import lakefs_sdk
from lakefs_sdk.models.ref import Ref
from lakefs_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'
# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.TagsApi(api_client)
repository = 'repository_example' # str |
tag = 'tag_example' # str |
try:
# get tag
api_response = api_instance.get_tag(repository, tag)
print("The response of TagsApi->get_tag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->get_tag: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | ||
tag | str |
Return type
Authorization
basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | tag | - |
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_tags
RefList list_tags(repository, prefix=prefix, after=after, amount=amount)
list tags
Example
- Basic Authentication (basic_auth):
- Api Key Authentication (cookie_auth):
- Api Key Authentication (oidc_auth):
- Api Key Authentication (saml_auth):
- Bearer (JWT) Authentication (jwt_token):
import time
import os
import lakefs_sdk
from lakefs_sdk.models.ref_list import RefList
from lakefs_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lakefs_sdk.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basic_auth
configuration = lakefs_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: cookie_auth
configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
# Configure API key authorization: oidc_auth
configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
# Configure API key authorization: saml_auth
configuration.api_key['saml_auth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['saml_auth'] = 'Bearer'
# Configure Bearer authorization (JWT): jwt_token
configuration = lakefs_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with lakefs_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lakefs_sdk.TagsApi(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) (default to 100)
try:
# list tags
api_response = api_instance.list_tags(repository, prefix=prefix, after=after, amount=amount)
print("The response of TagsApi->list_tags:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TagsApi->list_tags: %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] [default to 100] |
Return type
Authorization
basic_auth, cookie_auth, oidc_auth, saml_auth, jwt_token
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | tag 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]