### Wizard GUI Quickstart Started Metric Source: https://github.com/treeverse/lakefs/blob/master/design/open/ttv-wizard-mvp.md Indicates the start of the Quickstart process in the Wizard GUI. ```json { "class": "spark_wizard", "name": "quickstart_start", "value": 1 } ``` -------------------------------- ### Reset Branch Example Source: https://github.com/treeverse/lakefs/blob/master/clients/java/docs/BranchesApi.md Demonstrates how to reset a branch to a specific state. Includes setup for various authentication methods and error handling. ```java import io.lakefs.clients.sdk.ApiClient; import io.lakefs.clients.sdk.ApiException; import io.lakefs.clients.sdk.Configuration; import io.lakefs.clients.sdk.auth.*; import io.lakefs.clients.sdk.models.*; import io.lakefs.clients.sdk.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); basic_auth.setUsername("YOUR USERNAME"); basic_auth.setPassword("YOUR PASSWORD"); // Configure API key authorization: cookie_auth ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); cookie_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //oidc_auth.setApiKeyPrefix("Token"); // Configure API key authorization: saml_auth ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); saml_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); // Configure HTTP bearer authorization: jwt_token HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); jwt_token.setBearerToken("BEARER TOKEN"); BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | ResetCreation resetCreation = new ResetCreation(); // ResetCreation | try { apiInstance.resetBranch(repository, branch, resetCreation) .execute(); } catch (ApiException e) { System.err.println("Exception when calling BranchesApi#resetBranch"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` -------------------------------- ### Run a Single Test File Source: https://github.com/treeverse/lakefs/blob/master/webui/test/README.md Executes a specific test file, for example, 'quickstart.spec.ts', while skipping the setup phase. ```bash SKIP_SETUP=true npx playwright test test/e2e/common/quickstart.spec.ts ``` -------------------------------- ### Get Setup State Source: https://github.com/treeverse/lakefs/blob/master/clients/java/README.md Checks if the LakeFS installation is already set up. ```APIDOC ## GET /setup_lakefs ### Description Checks if the LakeFS installation is already set up. ### Method GET ### Endpoint /setup_lakefs ``` -------------------------------- ### Setup Communication Preferences Source: https://github.com/treeverse/lakefs/blob/master/clients/python/docs/InternalApi.md Demonstrates how to set up communication preferences using the lakeFS SDK. Ensure the SDK is installed and configured with the correct host. ```python import time import os import lakefs_sdk from lakefs_sdk.models.comm_prefs_input import CommPrefsInput 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" ) # 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.InternalApi(api_client) comm_prefs_input = lakefs_sdk.CommPrefsInput() # CommPrefsInput | try: # setup communications preferences api_instance.setup_comm_prefs(comm_prefs_input) except Exception as e: print("Exception when calling InternalApi->setup_comm_prefs: %s\n" % e) ``` -------------------------------- ### Create Tag Example Source: https://github.com/treeverse/lakefs/blob/master/clients/java/docs/TagsApi.md Demonstrates how to create a tag for a repository using the Java SDK. Includes setup for various authentication methods and error handling. ```java import io.lakefs.clients.sdk.ApiClient; import io.lakefs.clients.sdk.ApiException; import io.lakefs.clients.sdk.Configuration; import io.lakefs.clients.sdk.auth.*; import io.lakefs.clients.sdk.models.*; import io.lakefs.clients.sdk.TagsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); basic_auth.setUsername("YOUR USERNAME"); basic_auth.setPassword("YOUR PASSWORD"); // Configure API key authorization: cookie_auth ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); cookie_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //oidc_auth.setApiKeyPrefix("Token"); // Configure API key authorization: saml_auth ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); saml_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); // Configure HTTP bearer authorization: jwt_token HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); jwt_token.setBearerToken("BEARER TOKEN"); TagsApi apiInstance = new TagsApi(defaultClient); String repository = "repository_example"; // String | TagCreation tagCreation = new TagCreation(); // TagCreation | try { Ref result = apiInstance.createTag(repository, tagCreation) .execute(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#createTag"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` -------------------------------- ### Install and Run lakeFS Sandbox Source: https://github.com/treeverse/lakefs/blob/master/README.md Installs lakeFS using pip and starts a standalone sandbox instance. Open the web browser to http://127.0.0.1:8000/ after execution. ```bash pip install lakefs python -m lakefs.quickstart ``` -------------------------------- ### Create Repository Java Example Source: https://github.com/treeverse/lakefs/blob/master/clients/java/docs/RepositoriesApi.md Demonstrates how to create a new repository using the Repositories API. Includes setup for various authentication methods and error handling. Ensure all necessary imports are included. ```java import io.lakefs.clients.sdk.ApiClient; import io.lakefs.clients.sdk.ApiException; import io.lakefs.clients.sdk.Configuration; import io.lakefs.clients.sdk.auth.*; import io.lakefs.clients.sdk.models.*; import io.lakefs.clients.sdk.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); basic_auth.setUsername("YOUR USERNAME"); basic_auth.setPassword("YOUR PASSWORD"); // Configure API key authorization: cookie_auth ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); cookie_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //oidc_auth.setApiKeyPrefix("Token"); // Configure API key authorization: saml_auth ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); saml_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); // Configure HTTP bearer authorization: jwt_token HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); jwt_token.setBearerToken("BEARER TOKEN"); RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); RepositoryCreation repositoryCreation = new RepositoryCreation(); // RepositoryCreation | Boolean bare = false; // Boolean | If true, create a bare repository with no initial commit and branch try { Repository result = apiInstance.createRepository(repositoryCreation) .bare(bare) .execute(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoriesApi#createRepository"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` -------------------------------- ### Java Example for uploadPart Source: https://github.com/treeverse/lakefs/blob/master/clients/java/docs/ExperimentalApi.md Demonstrates how to configure authentication and call the uploadPart method to get a presigned URL for uploading a file part. Ensure all necessary imports are included. ```java import io.lakefs.clients.sdk.ApiClient; import io.lakefs.clients.sdk.ApiException; import io.lakefs.clients.sdk.Configuration; import io.lakefs.clients.sdk.auth.*; import io.lakefs.clients.sdk.models.*; import io.lakefs.clients.sdk.ExperimentalApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); basic_auth.setUsername("YOUR USERNAME"); basic_auth.setPassword("YOUR PASSWORD"); // Configure API key authorization: cookie_auth ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); cookie_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //oidc_auth.setApiKeyPrefix("Token"); // Configure API key authorization: saml_auth ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); saml_auth.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); // Configure HTTP bearer authorization: jwt_token HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); jwt_token.setBearerToken("BEARER TOKEN"); ExperimentalApi apiInstance = new ExperimentalApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | String uploadId = "uploadId_example"; // String | String path = "path_example"; // String | Integer partNumber = 56; // Integer | UploadPartFrom uploadPartFrom = new UploadPartFrom(); // UploadPartFrom | try { UploadTo result = apiInstance.uploadPart(repository, branch, uploadId, path, partNumber, uploadPartFrom) .execute(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ExperimentalApi#uploadPart"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` -------------------------------- ### Generated README Content Source: https://github.com/treeverse/lakefs/blob/master/design/open/ttv-wizard-mvp.md Example content for a generated README.md file, summarizing setup steps and configurations without sensitive credentials. ```markdown 1. Created a repository "spark-repo" and branch "main". 2. Imported data from . 3. Generated the following configurations: