View on GitHub

lakeFS

lakeFS - Data version control for your data lake | Git for data

lakefs_client.StatisticsApi

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

Method HTTP request Description
post_stats_events POST /statistics post stats events, this endpoint is meant for internal use only

post_stats_events

post_stats_events(stats_events_list)

post stats events, this endpoint is meant for internal use only

Example

import time
import lakefs_client
from lakefs_client.api import statistics_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 = statistics_api.StatisticsApi(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 StatisticsApi->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

HTTP response details

Status code Description Response headers
204 reported successfully -
400 Bad Request -
401 Unauthorized -
0 Internal Server Error -

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