diff --git a/api/swagger.yml b/api/swagger.yml
index 04cd69a5398..b12b2f39508 100644
--- a/api/swagger.yml
+++ b/api/swagger.yml
@@ -594,6 +594,53 @@ components:
ref:
type: string
+ TaskInfo:
+ type: object
+ required:
+ - id
+ properties:
+ id:
+ type: string
+ description: ID of the task
+
+ RepositoryDumpStatus:
+ type: object
+ required:
+ - id
+ - done
+ - update_time
+ properties:
+ id:
+ type: string
+ description: ID of the task
+ done:
+ type: boolean
+ update_time:
+ type: string
+ format: date-time
+ error:
+ type: string
+ refs:
+ $ref: "#/components/schemas/RefsDump"
+
+ RepositoryRestoreStatus:
+ type: object
+ required:
+ - id
+ - done
+ - update_time
+ properties:
+ id:
+ type: string
+ description: ID of the task
+ done:
+ type: boolean
+ update_time:
+ type: string
+ format: date-time
+ error:
+ type: string
+
RefsDump:
type: object
required:
@@ -2686,6 +2733,125 @@ paths:
default:
$ref: "#/components/responses/ServerError"
+
+ /repositories/{repository}/dump:
+ parameters:
+ - in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ post:
+ tags:
+ - repositories
+ operationId: dumpSubmit
+ summary: Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
+ responses:
+ 202:
+ description: dump task information
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/TaskInfo"
+ 400:
+ $ref: "#/components/responses/ValidationError"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ default:
+ $ref: "#/components/responses/ServerError"
+ get:
+ tags:
+ - repositories
+ operationId: dumpStatus
+ summary: Status of a repository dump task
+ parameters:
+ - in: query
+ name: task_id
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: dump task status
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RepositoryDumpStatus"
+ 400:
+ $ref: "#/components/responses/ValidationError"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
+
+ /repositories/{repository}/restore:
+ parameters:
+ - in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ post:
+ tags:
+ - repositories
+ operationId: restoreSubmit
+ summary: Restore repository from a dump in the object store
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RefsDump"
+ responses:
+ 202:
+ description: restore task created
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/TaskInfo"
+ 400:
+ $ref: "#/components/responses/ValidationError"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ default:
+ $ref: "#/components/responses/ServerError"
+ get:
+ tags:
+ - repositories
+ operationId: restoreStatus
+ summary: Status of a restore request
+ parameters:
+ - in: query
+ name: task_id
+ required: true
+ schema:
+ type: string
+ responses:
+ 200:
+ description: restore task status
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RepositoryRestoreStatus"
+ 400:
+ $ref: "#/components/responses/ValidationError"
+ 401:
+ $ref: "#/components/responses/Unauthorized"
+ 404:
+ $ref: "#/components/responses/NotFound"
+ 420:
+ description: too many requests
+ default:
+ $ref: "#/components/responses/ServerError"
+
/repositories/{repository}/tags:
parameters:
- in: path
diff --git a/clients/java-legacy/.openapi-generator/FILES b/clients/java-legacy/.openapi-generator/FILES
index f4bb3d8dbb3..5d04c93464e 100644
--- a/clients/java-legacy/.openapi-generator/FILES
+++ b/clients/java-legacy/.openapi-generator/FILES
@@ -84,7 +84,9 @@ docs/RefsDump.md
docs/RepositoriesApi.md
docs/Repository.md
docs/RepositoryCreation.md
+docs/RepositoryDumpStatus.md
docs/RepositoryList.md
+docs/RepositoryRestoreStatus.md
docs/ResetCreation.md
docs/RevertCreation.md
docs/Setup.md
@@ -99,6 +101,7 @@ docs/StorageConfig.md
docs/StorageURI.md
docs/TagCreation.md
docs/TagsApi.md
+docs/TaskInfo.md
docs/UnderlyingObjectProperties.md
docs/UpdateToken.md
docs/User.md
@@ -212,7 +215,9 @@ src/main/java/io/lakefs/clients/api/model/RefList.java
src/main/java/io/lakefs/clients/api/model/RefsDump.java
src/main/java/io/lakefs/clients/api/model/Repository.java
src/main/java/io/lakefs/clients/api/model/RepositoryCreation.java
+src/main/java/io/lakefs/clients/api/model/RepositoryDumpStatus.java
src/main/java/io/lakefs/clients/api/model/RepositoryList.java
+src/main/java/io/lakefs/clients/api/model/RepositoryRestoreStatus.java
src/main/java/io/lakefs/clients/api/model/ResetCreation.java
src/main/java/io/lakefs/clients/api/model/RevertCreation.java
src/main/java/io/lakefs/clients/api/model/Setup.java
@@ -225,6 +230,7 @@ src/main/java/io/lakefs/clients/api/model/StatsEventsList.java
src/main/java/io/lakefs/clients/api/model/StorageConfig.java
src/main/java/io/lakefs/clients/api/model/StorageURI.java
src/main/java/io/lakefs/clients/api/model/TagCreation.java
+src/main/java/io/lakefs/clients/api/model/TaskInfo.java
src/main/java/io/lakefs/clients/api/model/UnderlyingObjectProperties.java
src/main/java/io/lakefs/clients/api/model/UpdateToken.java
src/main/java/io/lakefs/clients/api/model/User.java
@@ -311,7 +317,9 @@ src/test/java/io/lakefs/clients/api/model/RefListTest.java
src/test/java/io/lakefs/clients/api/model/RefTest.java
src/test/java/io/lakefs/clients/api/model/RefsDumpTest.java
src/test/java/io/lakefs/clients/api/model/RepositoryCreationTest.java
+src/test/java/io/lakefs/clients/api/model/RepositoryDumpStatusTest.java
src/test/java/io/lakefs/clients/api/model/RepositoryListTest.java
+src/test/java/io/lakefs/clients/api/model/RepositoryRestoreStatusTest.java
src/test/java/io/lakefs/clients/api/model/RepositoryTest.java
src/test/java/io/lakefs/clients/api/model/ResetCreationTest.java
src/test/java/io/lakefs/clients/api/model/RevertCreationTest.java
@@ -325,6 +333,7 @@ src/test/java/io/lakefs/clients/api/model/StatsEventsListTest.java
src/test/java/io/lakefs/clients/api/model/StorageConfigTest.java
src/test/java/io/lakefs/clients/api/model/StorageURITest.java
src/test/java/io/lakefs/clients/api/model/TagCreationTest.java
+src/test/java/io/lakefs/clients/api/model/TaskInfoTest.java
src/test/java/io/lakefs/clients/api/model/UnderlyingObjectPropertiesTest.java
src/test/java/io/lakefs/clients/api/model/UpdateTokenTest.java
src/test/java/io/lakefs/clients/api/model/UserCreationTest.java
diff --git a/clients/java-legacy/README.md b/clients/java-legacy/README.md
index 4988fc95aa3..0100e5ec864 100644
--- a/clients/java-legacy/README.md
+++ b/clients/java-legacy/README.md
@@ -228,11 +228,15 @@ Class | Method | HTTP request | Description
*RepositoriesApi* | [**createRepository**](docs/RepositoriesApi.md#createRepository) | **POST** /repositories | create repository
*RepositoriesApi* | [**deleteGCRules**](docs/RepositoriesApi.md#deleteGCRules) | **DELETE** /repositories/{repository}/settings/gc_rules |
*RepositoriesApi* | [**deleteRepository**](docs/RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository
+*RepositoriesApi* | [**dumpStatus**](docs/RepositoriesApi.md#dumpStatus) | **GET** /repositories/{repository}/dump | Status of a repository dump task
+*RepositoriesApi* | [**dumpSubmit**](docs/RepositoriesApi.md#dumpSubmit) | **POST** /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
*RepositoriesApi* | [**getBranchProtectionRules**](docs/RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules
*RepositoriesApi* | [**getGCRules**](docs/RepositoriesApi.md#getGCRules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules
*RepositoriesApi* | [**getRepository**](docs/RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository
*RepositoriesApi* | [**getRepositoryMetadata**](docs/RepositoriesApi.md#getRepositoryMetadata) | **GET** /repositories/{repository}/metadata | get repository metadata
*RepositoriesApi* | [**listRepositories**](docs/RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories
+*RepositoriesApi* | [**restoreStatus**](docs/RepositoriesApi.md#restoreStatus) | **GET** /repositories/{repository}/restore | Status of a restore request
+*RepositoriesApi* | [**restoreSubmit**](docs/RepositoriesApi.md#restoreSubmit) | **POST** /repositories/{repository}/restore | Restore repository from a dump in the object store
*RepositoriesApi* | [**setBranchProtectionRules**](docs/RepositoriesApi.md#setBranchProtectionRules) | **PUT** /repositories/{repository}/settings/branch_protection |
*RepositoriesApi* | [**setGCRules**](docs/RepositoriesApi.md#setGCRules) | **PUT** /repositories/{repository}/settings/gc_rules |
*StagingApi* | [**getPhysicalAddress**](docs/StagingApi.md#getPhysicalAddress) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | generate an address to which the client can upload an object
@@ -311,7 +315,9 @@ Class | Method | HTTP request | Description
- [RefsDump](docs/RefsDump.md)
- [Repository](docs/Repository.md)
- [RepositoryCreation](docs/RepositoryCreation.md)
+ - [RepositoryDumpStatus](docs/RepositoryDumpStatus.md)
- [RepositoryList](docs/RepositoryList.md)
+ - [RepositoryRestoreStatus](docs/RepositoryRestoreStatus.md)
- [ResetCreation](docs/ResetCreation.md)
- [RevertCreation](docs/RevertCreation.md)
- [Setup](docs/Setup.md)
@@ -324,6 +330,7 @@ Class | Method | HTTP request | Description
- [StorageConfig](docs/StorageConfig.md)
- [StorageURI](docs/StorageURI.md)
- [TagCreation](docs/TagCreation.md)
+ - [TaskInfo](docs/TaskInfo.md)
- [UnderlyingObjectProperties](docs/UnderlyingObjectProperties.md)
- [UpdateToken](docs/UpdateToken.md)
- [User](docs/User.md)
diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml
index 41b0a7d53dd..ef51906e752 100644
--- a/clients/java-legacy/api/openapi.yaml
+++ b/clients/java-legacy/api/openapi.yaml
@@ -2303,6 +2303,214 @@ paths:
- internal
x-contentType: application/json
x-accepts: application/json
+ /repositories/{repository}/dump:
+ get:
+ operationId: dumpStatus
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ - explode: true
+ in: query
+ name: task_id
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepositoryDumpStatus'
+ description: dump task status
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Status of a repository dump task
+ tags:
+ - repositories
+ x-accepts: application/json
+ post:
+ operationId: dumpSubmit
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "202":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskInfo'
+ description: dump task information
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Backup the repository metadata (tags, commits, branches) and save the
+ backup to the object store.
+ tags:
+ - repositories
+ x-accepts: application/json
+ /repositories/{repository}/restore:
+ get:
+ operationId: restoreStatus
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ - explode: true
+ in: query
+ name: task_id
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepositoryRestoreStatus'
+ description: restore task status
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Status of a restore request
+ tags:
+ - repositories
+ x-accepts: application/json
+ post:
+ operationId: restoreSubmit
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RefsDump'
+ required: true
+ responses:
+ "202":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskInfo'
+ description: restore task created
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Restore repository from a dump in the object store
+ tags:
+ - repositories
+ x-contentType: application/json
+ x-accepts: application/json
/repositories/{repository}/tags:
get:
operationId: listTags
@@ -6546,6 +6754,66 @@ components:
- id
- ref
type: object
+ TaskInfo:
+ example:
+ id: id
+ properties:
+ id:
+ description: ID of the task
+ type: string
+ required:
+ - id
+ type: object
+ RepositoryDumpStatus:
+ example:
+ update_time: 2000-01-23T04:56:07.000+00:00
+ refs:
+ tags_meta_range_id: tags_meta_range_id
+ branches_meta_range_id: branches_meta_range_id
+ commits_meta_range_id: commits_meta_range_id
+ id: id
+ error: error
+ done: true
+ properties:
+ id:
+ description: ID of the task
+ type: string
+ done:
+ type: boolean
+ update_time:
+ format: date-time
+ type: string
+ error:
+ type: string
+ refs:
+ $ref: '#/components/schemas/RefsDump'
+ required:
+ - done
+ - id
+ - update_time
+ type: object
+ RepositoryRestoreStatus:
+ example:
+ update_time: 2000-01-23T04:56:07.000+00:00
+ id: id
+ error: error
+ done: true
+ properties:
+ id:
+ description: ID of the task
+ type: string
+ done:
+ type: boolean
+ update_time:
+ format: date-time
+ type: string
+ error:
+ type: string
+ required:
+ - done
+ - id
+ - update_time
+ type: object
RefsDump:
example:
tags_meta_range_id: tags_meta_range_id
diff --git a/clients/java-legacy/docs/RepositoriesApi.md b/clients/java-legacy/docs/RepositoriesApi.md
index abf8980ce6d..cc325763ab3 100644
--- a/clients/java-legacy/docs/RepositoriesApi.md
+++ b/clients/java-legacy/docs/RepositoriesApi.md
@@ -7,11 +7,15 @@ Method | HTTP request | Description
[**createRepository**](RepositoriesApi.md#createRepository) | **POST** /repositories | create repository
[**deleteGCRules**](RepositoriesApi.md#deleteGCRules) | **DELETE** /repositories/{repository}/settings/gc_rules |
[**deleteRepository**](RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository
+[**dumpStatus**](RepositoriesApi.md#dumpStatus) | **GET** /repositories/{repository}/dump | Status of a repository dump task
+[**dumpSubmit**](RepositoriesApi.md#dumpSubmit) | **POST** /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
[**getBranchProtectionRules**](RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules
[**getGCRules**](RepositoriesApi.md#getGCRules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules
[**getRepository**](RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository
[**getRepositoryMetadata**](RepositoriesApi.md#getRepositoryMetadata) | **GET** /repositories/{repository}/metadata | get repository metadata
[**listRepositories**](RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories
+[**restoreStatus**](RepositoriesApi.md#restoreStatus) | **GET** /repositories/{repository}/restore | Status of a restore request
+[**restoreSubmit**](RepositoriesApi.md#restoreSubmit) | **POST** /repositories/{repository}/restore | Restore repository from a dump in the object store
[**setBranchProtectionRules**](RepositoriesApi.md#setBranchProtectionRules) | **PUT** /repositories/{repository}/settings/branch_protection |
[**setGCRules**](RepositoriesApi.md#setGCRules) | **PUT** /repositories/{repository}/settings/gc_rules |
@@ -293,6 +297,193 @@ null (empty response body)
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **dumpStatus**
+> RepositoryDumpStatus dumpStatus(repository, taskId)
+
+Status of a repository dump task
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.RepositoriesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/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 HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER 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");
+
+ RepositoriesApi apiInstance = new RepositoriesApi(defaultClient);
+ String repository = "repository_example"; // String |
+ String taskId = "taskId_example"; // String |
+ try {
+ RepositoryDumpStatus result = apiInstance.dumpStatus(repository, taskId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#dumpStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **repository** | **String**| |
+ **taskId** | **String**| |
+
+### Return type
+
+[**RepositoryDumpStatus**](RepositoryDumpStatus.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | dump task status | - |
+**400** | Validation Error | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
+
+# **dumpSubmit**
+> TaskInfo dumpSubmit(repository)
+
+Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.RepositoriesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/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 HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER 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");
+
+ RepositoriesApi apiInstance = new RepositoriesApi(defaultClient);
+ String repository = "repository_example"; // String |
+ try {
+ TaskInfo result = apiInstance.dumpSubmit(repository);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#dumpSubmit");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **repository** | **String**| |
+
+### Return type
+
+[**TaskInfo**](TaskInfo.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**202** | dump task information | - |
+**400** | Validation Error | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**0** | Internal Server Error | - |
+
# **getBranchProtectionRules**
> List<BranchProtectionRule> getBranchProtectionRules(repository)
@@ -756,6 +947,195 @@ Name | Type | Description | Notes
**420** | too many requests | - |
**0** | Internal Server Error | - |
+
+# **restoreStatus**
+> RepositoryRestoreStatus restoreStatus(repository, taskId)
+
+Status of a restore request
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.RepositoriesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/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 HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER 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");
+
+ RepositoriesApi apiInstance = new RepositoriesApi(defaultClient);
+ String repository = "repository_example"; // String |
+ String taskId = "taskId_example"; // String |
+ try {
+ RepositoryRestoreStatus result = apiInstance.restoreStatus(repository, taskId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#restoreStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **repository** | **String**| |
+ **taskId** | **String**| |
+
+### Return type
+
+[**RepositoryRestoreStatus**](RepositoryRestoreStatus.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | restore task status | - |
+**400** | Validation Error | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**420** | too many requests | - |
+**0** | Internal Server Error | - |
+
+
+# **restoreSubmit**
+> TaskInfo restoreSubmit(repository, refsDump)
+
+Restore repository from a dump in the object store
+
+### Example
+```java
+// Import classes:
+import io.lakefs.clients.api.ApiClient;
+import io.lakefs.clients.api.ApiException;
+import io.lakefs.clients.api.Configuration;
+import io.lakefs.clients.api.auth.*;
+import io.lakefs.clients.api.models.*;
+import io.lakefs.clients.api.RepositoriesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost/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 HTTP bearer authorization: jwt_token
+ HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
+ jwt_token.setBearerToken("BEARER 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");
+
+ RepositoriesApi apiInstance = new RepositoriesApi(defaultClient);
+ String repository = "repository_example"; // String |
+ RefsDump refsDump = new RefsDump(); // RefsDump |
+ try {
+ TaskInfo result = apiInstance.restoreSubmit(repository, refsDump);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#restoreSubmit");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **repository** | **String**| |
+ **refsDump** | [**RefsDump**](RefsDump.md)| |
+
+### Return type
+
+[**TaskInfo**](TaskInfo.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**202** | restore task created | - |
+**400** | Validation Error | - |
+**401** | Unauthorized | - |
+**404** | Resource Not Found | - |
+**0** | Internal Server Error | - |
+
# **setBranchProtectionRules**
> setBranchProtectionRules(repository, branchProtectionRule, ifMatch)
diff --git a/clients/java-legacy/docs/RepositoryDumpStatus.md b/clients/java-legacy/docs/RepositoryDumpStatus.md
new file mode 100644
index 00000000000..b01bc10a688
--- /dev/null
+++ b/clients/java-legacy/docs/RepositoryDumpStatus.md
@@ -0,0 +1,17 @@
+
+
+# RepositoryDumpStatus
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | ID of the task |
+**done** | **Boolean** | |
+**updateTime** | **OffsetDateTime** | |
+**error** | **String** | | [optional]
+**refs** | [**RefsDump**](RefsDump.md) | | [optional]
+
+
+
diff --git a/clients/java-legacy/docs/RepositoryRestoreStatus.md b/clients/java-legacy/docs/RepositoryRestoreStatus.md
new file mode 100644
index 00000000000..d058b185eb4
--- /dev/null
+++ b/clients/java-legacy/docs/RepositoryRestoreStatus.md
@@ -0,0 +1,16 @@
+
+
+# RepositoryRestoreStatus
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | ID of the task |
+**done** | **Boolean** | |
+**updateTime** | **OffsetDateTime** | |
+**error** | **String** | | [optional]
+
+
+
diff --git a/clients/java-legacy/docs/TaskInfo.md b/clients/java-legacy/docs/TaskInfo.md
new file mode 100644
index 00000000000..2286cb19873
--- /dev/null
+++ b/clients/java-legacy/docs/TaskInfo.md
@@ -0,0 +1,13 @@
+
+
+# TaskInfo
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | ID of the task |
+
+
+
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/RepositoriesApi.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/RepositoriesApi.java
index 080ff1c98a9..0eb71877e55 100644
--- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/RepositoriesApi.java
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/RepositoriesApi.java
@@ -30,9 +30,13 @@
import io.lakefs.clients.api.model.BranchProtectionRule;
import io.lakefs.clients.api.model.Error;
import io.lakefs.clients.api.model.GarbageCollectionRules;
+import io.lakefs.clients.api.model.RefsDump;
import io.lakefs.clients.api.model.Repository;
import io.lakefs.clients.api.model.RepositoryCreation;
+import io.lakefs.clients.api.model.RepositoryDumpStatus;
import io.lakefs.clients.api.model.RepositoryList;
+import io.lakefs.clients.api.model.RepositoryRestoreStatus;
+import io.lakefs.clients.api.model.TaskInfo;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -446,6 +450,279 @@ public okhttp3.Call deleteRepositoryAsync(String repository, final ApiCallback
+ Status Code | Description | Response Headers |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call dumpStatusCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/repositories/{repository}/dump"
+ .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (taskId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("task_id", taskId));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call dumpStatusValidateBeforeCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'repository' is set
+ if (repository == null) {
+ throw new ApiException("Missing the required parameter 'repository' when calling dumpStatus(Async)");
+ }
+
+ // verify the required parameter 'taskId' is set
+ if (taskId == null) {
+ throw new ApiException("Missing the required parameter 'taskId' when calling dumpStatus(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = dumpStatusCall(repository, taskId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Status of a repository dump task
+ *
+ * @param repository (required)
+ * @param taskId (required)
+ * @return RepositoryDumpStatus
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public RepositoryDumpStatus dumpStatus(String repository, String taskId) throws ApiException {
+ ApiResponse localVarResp = dumpStatusWithHttpInfo(repository, taskId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Status of a repository dump task
+ *
+ * @param repository (required)
+ * @param taskId (required)
+ * @return ApiResponse<RepositoryDumpStatus>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse dumpStatusWithHttpInfo(String repository, String taskId) throws ApiException {
+ okhttp3.Call localVarCall = dumpStatusValidateBeforeCall(repository, taskId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Status of a repository dump task (asynchronously)
+ *
+ * @param repository (required)
+ * @param taskId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call dumpStatusAsync(String repository, String taskId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = dumpStatusValidateBeforeCall(repository, taskId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for dumpSubmit
+ * @param repository (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call dumpSubmitCall(String repository, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/repositories/{repository}/dump"
+ .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call dumpSubmitValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'repository' is set
+ if (repository == null) {
+ throw new ApiException("Missing the required parameter 'repository' when calling dumpSubmit(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = dumpSubmitCall(repository, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
+ *
+ * @param repository (required)
+ * @return TaskInfo
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public TaskInfo dumpSubmit(String repository) throws ApiException {
+ ApiResponse localVarResp = dumpSubmitWithHttpInfo(repository);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
+ *
+ * @param repository (required)
+ * @return ApiResponse<TaskInfo>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse dumpSubmitWithHttpInfo(String repository) throws ApiException {
+ okhttp3.Call localVarCall = dumpSubmitValidateBeforeCall(repository, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Backup the repository metadata (tags, commits, branches) and save the backup to the object store. (asynchronously)
+ *
+ * @param repository (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call dumpSubmitAsync(String repository, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = dumpSubmitValidateBeforeCall(repository, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for getBranchProtectionRules
* @param repository (required)
@@ -1096,6 +1373,288 @@ public okhttp3.Call listRepositoriesAsync(String prefix, String after, Integer a
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for restoreStatus
+ * @param repository (required)
+ * @param taskId (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | restore task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call restoreStatusCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/repositories/{repository}/restore"
+ .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (taskId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("task_id", taskId));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call restoreStatusValidateBeforeCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'repository' is set
+ if (repository == null) {
+ throw new ApiException("Missing the required parameter 'repository' when calling restoreStatus(Async)");
+ }
+
+ // verify the required parameter 'taskId' is set
+ if (taskId == null) {
+ throw new ApiException("Missing the required parameter 'taskId' when calling restoreStatus(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = restoreStatusCall(repository, taskId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Status of a restore request
+ *
+ * @param repository (required)
+ * @param taskId (required)
+ * @return RepositoryRestoreStatus
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | restore task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public RepositoryRestoreStatus restoreStatus(String repository, String taskId) throws ApiException {
+ ApiResponse localVarResp = restoreStatusWithHttpInfo(repository, taskId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Status of a restore request
+ *
+ * @param repository (required)
+ * @param taskId (required)
+ * @return ApiResponse<RepositoryRestoreStatus>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | restore task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse restoreStatusWithHttpInfo(String repository, String taskId) throws ApiException {
+ okhttp3.Call localVarCall = restoreStatusValidateBeforeCall(repository, taskId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Status of a restore request (asynchronously)
+ *
+ * @param repository (required)
+ * @param taskId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | restore task status | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 420 | too many requests | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call restoreStatusAsync(String repository, String taskId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = restoreStatusValidateBeforeCall(repository, taskId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for restoreSubmit
+ * @param repository (required)
+ * @param refsDump (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | restore task created | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call restoreSubmitCall(String repository, RefsDump refsDump, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = refsDump;
+
+ // create path and map variables
+ String localVarPath = "/repositories/{repository}/restore"
+ .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call restoreSubmitValidateBeforeCall(String repository, RefsDump refsDump, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'repository' is set
+ if (repository == null) {
+ throw new ApiException("Missing the required parameter 'repository' when calling restoreSubmit(Async)");
+ }
+
+ // verify the required parameter 'refsDump' is set
+ if (refsDump == null) {
+ throw new ApiException("Missing the required parameter 'refsDump' when calling restoreSubmit(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = restoreSubmitCall(repository, refsDump, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Restore repository from a dump in the object store
+ *
+ * @param repository (required)
+ * @param refsDump (required)
+ * @return TaskInfo
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | restore task created | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public TaskInfo restoreSubmit(String repository, RefsDump refsDump) throws ApiException {
+ ApiResponse localVarResp = restoreSubmitWithHttpInfo(repository, refsDump);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Restore repository from a dump in the object store
+ *
+ * @param repository (required)
+ * @param refsDump (required)
+ * @return ApiResponse<TaskInfo>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | restore task created | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public ApiResponse restoreSubmitWithHttpInfo(String repository, RefsDump refsDump) throws ApiException {
+ okhttp3.Call localVarCall = restoreSubmitValidateBeforeCall(repository, refsDump, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Restore repository from a dump in the object store (asynchronously)
+ *
+ * @param repository (required)
+ * @param refsDump (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 202 | restore task created | - |
+ 400 | Validation Error | - |
+ 401 | Unauthorized | - |
+ 404 | Resource Not Found | - |
+ 0 | Internal Server Error | - |
+
+ */
+ public okhttp3.Call restoreSubmitAsync(String repository, RefsDump refsDump, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = restoreSubmitValidateBeforeCall(repository, refsDump, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for setBranchProtectionRules
* @param repository (required)
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/RepositoryDumpStatus.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/RepositoryDumpStatus.java
new file mode 100644
index 00000000000..03fbeb1beb6
--- /dev/null
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/RepositoryDumpStatus.java
@@ -0,0 +1,216 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.lakefs.clients.api.model.RefsDump;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+
+/**
+ * RepositoryDumpStatus
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class RepositoryDumpStatus {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_DONE = "done";
+ @SerializedName(SERIALIZED_NAME_DONE)
+ private Boolean done;
+
+ public static final String SERIALIZED_NAME_UPDATE_TIME = "update_time";
+ @SerializedName(SERIALIZED_NAME_UPDATE_TIME)
+ private OffsetDateTime updateTime;
+
+ public static final String SERIALIZED_NAME_ERROR = "error";
+ @SerializedName(SERIALIZED_NAME_ERROR)
+ private String error;
+
+ public static final String SERIALIZED_NAME_REFS = "refs";
+ @SerializedName(SERIALIZED_NAME_REFS)
+ private RefsDump refs;
+
+
+ public RepositoryDumpStatus id(String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * ID of the task
+ * @return id
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "ID of the task")
+
+ public String getId() {
+ return id;
+ }
+
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public RepositoryDumpStatus done(Boolean done) {
+
+ this.done = done;
+ return this;
+ }
+
+ /**
+ * Get done
+ * @return done
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "")
+
+ public Boolean getDone() {
+ return done;
+ }
+
+
+ public void setDone(Boolean done) {
+ this.done = done;
+ }
+
+
+ public RepositoryDumpStatus updateTime(OffsetDateTime updateTime) {
+
+ this.updateTime = updateTime;
+ return this;
+ }
+
+ /**
+ * Get updateTime
+ * @return updateTime
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "")
+
+ public OffsetDateTime getUpdateTime() {
+ return updateTime;
+ }
+
+
+ public void setUpdateTime(OffsetDateTime updateTime) {
+ this.updateTime = updateTime;
+ }
+
+
+ public RepositoryDumpStatus error(String error) {
+
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get error
+ * @return error
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public String getError() {
+ return error;
+ }
+
+
+ public void setError(String error) {
+ this.error = error;
+ }
+
+
+ public RepositoryDumpStatus refs(RefsDump refs) {
+
+ this.refs = refs;
+ return this;
+ }
+
+ /**
+ * Get refs
+ * @return refs
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public RefsDump getRefs() {
+ return refs;
+ }
+
+
+ public void setRefs(RefsDump refs) {
+ this.refs = refs;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RepositoryDumpStatus repositoryDumpStatus = (RepositoryDumpStatus) o;
+ return Objects.equals(this.id, repositoryDumpStatus.id) &&
+ Objects.equals(this.done, repositoryDumpStatus.done) &&
+ Objects.equals(this.updateTime, repositoryDumpStatus.updateTime) &&
+ Objects.equals(this.error, repositoryDumpStatus.error) &&
+ Objects.equals(this.refs, repositoryDumpStatus.refs);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, done, updateTime, error, refs);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RepositoryDumpStatus {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" done: ").append(toIndentedString(done)).append("\n");
+ sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n");
+ sb.append(" error: ").append(toIndentedString(error)).append("\n");
+ sb.append(" refs: ").append(toIndentedString(refs)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/RepositoryRestoreStatus.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/RepositoryRestoreStatus.java
new file mode 100644
index 00000000000..b428d846070
--- /dev/null
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/RepositoryRestoreStatus.java
@@ -0,0 +1,186 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+
+/**
+ * RepositoryRestoreStatus
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class RepositoryRestoreStatus {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_DONE = "done";
+ @SerializedName(SERIALIZED_NAME_DONE)
+ private Boolean done;
+
+ public static final String SERIALIZED_NAME_UPDATE_TIME = "update_time";
+ @SerializedName(SERIALIZED_NAME_UPDATE_TIME)
+ private OffsetDateTime updateTime;
+
+ public static final String SERIALIZED_NAME_ERROR = "error";
+ @SerializedName(SERIALIZED_NAME_ERROR)
+ private String error;
+
+
+ public RepositoryRestoreStatus id(String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * ID of the task
+ * @return id
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "ID of the task")
+
+ public String getId() {
+ return id;
+ }
+
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public RepositoryRestoreStatus done(Boolean done) {
+
+ this.done = done;
+ return this;
+ }
+
+ /**
+ * Get done
+ * @return done
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "")
+
+ public Boolean getDone() {
+ return done;
+ }
+
+
+ public void setDone(Boolean done) {
+ this.done = done;
+ }
+
+
+ public RepositoryRestoreStatus updateTime(OffsetDateTime updateTime) {
+
+ this.updateTime = updateTime;
+ return this;
+ }
+
+ /**
+ * Get updateTime
+ * @return updateTime
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "")
+
+ public OffsetDateTime getUpdateTime() {
+ return updateTime;
+ }
+
+
+ public void setUpdateTime(OffsetDateTime updateTime) {
+ this.updateTime = updateTime;
+ }
+
+
+ public RepositoryRestoreStatus error(String error) {
+
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get error
+ * @return error
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public String getError() {
+ return error;
+ }
+
+
+ public void setError(String error) {
+ this.error = error;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RepositoryRestoreStatus repositoryRestoreStatus = (RepositoryRestoreStatus) o;
+ return Objects.equals(this.id, repositoryRestoreStatus.id) &&
+ Objects.equals(this.done, repositoryRestoreStatus.done) &&
+ Objects.equals(this.updateTime, repositoryRestoreStatus.updateTime) &&
+ Objects.equals(this.error, repositoryRestoreStatus.error);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, done, updateTime, error);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RepositoryRestoreStatus {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" done: ").append(toIndentedString(done)).append("\n");
+ sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n");
+ sb.append(" error: ").append(toIndentedString(error)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/TaskInfo.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/TaskInfo.java
new file mode 100644
index 00000000000..2de8a4147f8
--- /dev/null
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/TaskInfo.java
@@ -0,0 +1,98 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+
+/**
+ * TaskInfo
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class TaskInfo {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+
+ public TaskInfo id(String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * ID of the task
+ * @return id
+ **/
+ @javax.annotation.Nonnull
+ @ApiModelProperty(required = true, value = "ID of the task")
+
+ public String getId() {
+ return id;
+ }
+
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TaskInfo taskInfo = (TaskInfo) o;
+ return Objects.equals(this.id, taskInfo.id);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TaskInfo {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java
index 1a1ea47742e..7cea7adca81 100644
--- a/clients/java-legacy/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java
@@ -17,9 +17,13 @@
import io.lakefs.clients.api.model.BranchProtectionRule;
import io.lakefs.clients.api.model.Error;
import io.lakefs.clients.api.model.GarbageCollectionRules;
+import io.lakefs.clients.api.model.RefsDump;
import io.lakefs.clients.api.model.Repository;
import io.lakefs.clients.api.model.RepositoryCreation;
+import io.lakefs.clients.api.model.RepositoryDumpStatus;
import io.lakefs.clients.api.model.RepositoryList;
+import io.lakefs.clients.api.model.RepositoryRestoreStatus;
+import io.lakefs.clients.api.model.TaskInfo;
import org.junit.Test;
import org.junit.Ignore;
@@ -83,6 +87,37 @@ public void deleteRepositoryTest() throws ApiException {
// TODO: test validations
}
+ /**
+ * Status of a repository dump task
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void dumpStatusTest() throws ApiException {
+ String repository = null;
+ String taskId = null;
+ RepositoryDumpStatus response = api.dumpStatus(repository, taskId);
+ // TODO: test validations
+ }
+
+ /**
+ * Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void dumpSubmitTest() throws ApiException {
+ String repository = null;
+ TaskInfo response = api.dumpSubmit(repository);
+ // TODO: test validations
+ }
+
/**
* get branch protection rules
*
@@ -160,6 +195,38 @@ public void listRepositoriesTest() throws ApiException {
// TODO: test validations
}
+ /**
+ * Status of a restore request
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void restoreStatusTest() throws ApiException {
+ String repository = null;
+ String taskId = null;
+ RepositoryRestoreStatus response = api.restoreStatus(repository, taskId);
+ // TODO: test validations
+ }
+
+ /**
+ * Restore repository from a dump in the object store
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void restoreSubmitTest() throws ApiException {
+ String repository = null;
+ RefsDump refsDump = null;
+ TaskInfo response = api.restoreSubmit(repository, refsDump);
+ // TODO: test validations
+ }
+
/**
*
*
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/RepositoryDumpStatusTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/RepositoryDumpStatusTest.java
new file mode 100644
index 00000000000..1637b795b85
--- /dev/null
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/RepositoryDumpStatusTest.java
@@ -0,0 +1,85 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.lakefs.clients.api.model.RefsDump;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for RepositoryDumpStatus
+ */
+public class RepositoryDumpStatusTest {
+ private final RepositoryDumpStatus model = new RepositoryDumpStatus();
+
+ /**
+ * Model tests for RepositoryDumpStatus
+ */
+ @Test
+ public void testRepositoryDumpStatus() {
+ // TODO: test RepositoryDumpStatus
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ public void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'done'
+ */
+ @Test
+ public void doneTest() {
+ // TODO: test done
+ }
+
+ /**
+ * Test the property 'updateTime'
+ */
+ @Test
+ public void updateTimeTest() {
+ // TODO: test updateTime
+ }
+
+ /**
+ * Test the property 'error'
+ */
+ @Test
+ public void errorTest() {
+ // TODO: test error
+ }
+
+ /**
+ * Test the property 'refs'
+ */
+ @Test
+ public void refsTest() {
+ // TODO: test refs
+ }
+
+}
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/RepositoryRestoreStatusTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/RepositoryRestoreStatusTest.java
new file mode 100644
index 00000000000..64470afc820
--- /dev/null
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/RepositoryRestoreStatusTest.java
@@ -0,0 +1,76 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for RepositoryRestoreStatus
+ */
+public class RepositoryRestoreStatusTest {
+ private final RepositoryRestoreStatus model = new RepositoryRestoreStatus();
+
+ /**
+ * Model tests for RepositoryRestoreStatus
+ */
+ @Test
+ public void testRepositoryRestoreStatus() {
+ // TODO: test RepositoryRestoreStatus
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ public void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'done'
+ */
+ @Test
+ public void doneTest() {
+ // TODO: test done
+ }
+
+ /**
+ * Test the property 'updateTime'
+ */
+ @Test
+ public void updateTimeTest() {
+ // TODO: test updateTime
+ }
+
+ /**
+ * Test the property 'error'
+ */
+ @Test
+ public void errorTest() {
+ // TODO: test error
+ }
+
+}
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/TaskInfoTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/TaskInfoTest.java
new file mode 100644
index 00000000000..e73fc125db1
--- /dev/null
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/model/TaskInfoTest.java
@@ -0,0 +1,51 @@
+/*
+ * lakeFS API
+ * lakeFS HTTP API
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.lakefs.clients.api.model;
+
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for TaskInfo
+ */
+public class TaskInfoTest {
+ private final TaskInfo model = new TaskInfo();
+
+ /**
+ * Model tests for TaskInfo
+ */
+ @Test
+ public void testTaskInfo() {
+ // TODO: test TaskInfo
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ public void idTest() {
+ // TODO: test id
+ }
+
+}
diff --git a/clients/java/README.md b/clients/java/README.md
index d7121fc919a..0ce0c937776 100644
--- a/clients/java/README.md
+++ b/clients/java/README.md
@@ -236,11 +236,15 @@ Class | Method | HTTP request | Description
*RepositoriesApi* | [**createRepository**](docs/RepositoriesApi.md#createRepository) | **POST** /repositories | create repository
*RepositoriesApi* | [**deleteGCRules**](docs/RepositoriesApi.md#deleteGCRules) | **DELETE** /repositories/{repository}/settings/gc_rules |
*RepositoriesApi* | [**deleteRepository**](docs/RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository
+*RepositoriesApi* | [**dumpStatus**](docs/RepositoriesApi.md#dumpStatus) | **GET** /repositories/{repository}/dump | Status of a repository dump task
+*RepositoriesApi* | [**dumpSubmit**](docs/RepositoriesApi.md#dumpSubmit) | **POST** /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
*RepositoriesApi* | [**getBranchProtectionRules**](docs/RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules
*RepositoriesApi* | [**getGCRules**](docs/RepositoriesApi.md#getGCRules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules
*RepositoriesApi* | [**getRepository**](docs/RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository
*RepositoriesApi* | [**getRepositoryMetadata**](docs/RepositoriesApi.md#getRepositoryMetadata) | **GET** /repositories/{repository}/metadata | get repository metadata
*RepositoriesApi* | [**listRepositories**](docs/RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories
+*RepositoriesApi* | [**restoreStatus**](docs/RepositoriesApi.md#restoreStatus) | **GET** /repositories/{repository}/restore | Status of a restore request
+*RepositoriesApi* | [**restoreSubmit**](docs/RepositoriesApi.md#restoreSubmit) | **POST** /repositories/{repository}/restore | Restore repository from a dump in the object store
*RepositoriesApi* | [**setBranchProtectionRules**](docs/RepositoriesApi.md#setBranchProtectionRules) | **PUT** /repositories/{repository}/settings/branch_protection |
*RepositoriesApi* | [**setGCRules**](docs/RepositoriesApi.md#setGCRules) | **PUT** /repositories/{repository}/settings/gc_rules |
*StagingApi* | [**getPhysicalAddress**](docs/StagingApi.md#getPhysicalAddress) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | generate an address to which the client can upload an object
@@ -318,7 +322,9 @@ Class | Method | HTTP request | Description
- [RefsDump](docs/RefsDump.md)
- [Repository](docs/Repository.md)
- [RepositoryCreation](docs/RepositoryCreation.md)
+ - [RepositoryDumpStatus](docs/RepositoryDumpStatus.md)
- [RepositoryList](docs/RepositoryList.md)
+ - [RepositoryRestoreStatus](docs/RepositoryRestoreStatus.md)
- [ResetCreation](docs/ResetCreation.md)
- [RevertCreation](docs/RevertCreation.md)
- [Setup](docs/Setup.md)
@@ -331,6 +337,7 @@ Class | Method | HTTP request | Description
- [StorageConfig](docs/StorageConfig.md)
- [StorageURI](docs/StorageURI.md)
- [TagCreation](docs/TagCreation.md)
+ - [TaskInfo](docs/TaskInfo.md)
- [UnderlyingObjectProperties](docs/UnderlyingObjectProperties.md)
- [UpdateToken](docs/UpdateToken.md)
- [User](docs/User.md)
diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml
index 318c55d2ba5..2c74869deb5 100644
--- a/clients/java/api/openapi.yaml
+++ b/clients/java/api/openapi.yaml
@@ -2303,6 +2303,214 @@ paths:
- internal
x-content-type: application/json
x-accepts: application/json
+ /repositories/{repository}/dump:
+ get:
+ operationId: dumpStatus
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ - explode: true
+ in: query
+ name: task_id
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepositoryDumpStatus'
+ description: dump task status
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Status of a repository dump task
+ tags:
+ - repositories
+ x-accepts: application/json
+ post:
+ operationId: dumpSubmit
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "202":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskInfo'
+ description: dump task information
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: "Backup the repository metadata (tags, commits, branches) and save\
+ \ the backup to the object store."
+ tags:
+ - repositories
+ x-accepts: application/json
+ /repositories/{repository}/restore:
+ get:
+ operationId: restoreStatus
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ - explode: true
+ in: query
+ name: task_id
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepositoryRestoreStatus'
+ description: restore task status
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ "420":
+ description: too many requests
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Status of a restore request
+ tags:
+ - repositories
+ x-accepts: application/json
+ post:
+ operationId: restoreSubmit
+ parameters:
+ - explode: false
+ in: path
+ name: repository
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RefsDump'
+ required: true
+ responses:
+ "202":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskInfo'
+ description: restore task created
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Resource Not Found
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Internal Server Error
+ summary: Restore repository from a dump in the object store
+ tags:
+ - repositories
+ x-content-type: application/json
+ x-accepts: application/json
/repositories/{repository}/tags:
get:
operationId: listTags
@@ -6520,6 +6728,66 @@ components:
- id
- ref
type: object
+ TaskInfo:
+ example:
+ id: id
+ properties:
+ id:
+ description: ID of the task
+ type: string
+ required:
+ - id
+ type: object
+ RepositoryDumpStatus:
+ example:
+ update_time: 2000-01-23T04:56:07.000+00:00
+ refs:
+ tags_meta_range_id: tags_meta_range_id
+ branches_meta_range_id: branches_meta_range_id
+ commits_meta_range_id: commits_meta_range_id
+ id: id
+ error: error
+ done: true
+ properties:
+ id:
+ description: ID of the task
+ type: string
+ done:
+ type: boolean
+ update_time:
+ format: date-time
+ type: string
+ error:
+ type: string
+ refs:
+ $ref: '#/components/schemas/RefsDump'
+ required:
+ - done
+ - id
+ - update_time
+ type: object
+ RepositoryRestoreStatus:
+ example:
+ update_time: 2000-01-23T04:56:07.000+00:00
+ id: id
+ error: error
+ done: true
+ properties:
+ id:
+ description: ID of the task
+ type: string
+ done:
+ type: boolean
+ update_time:
+ format: date-time
+ type: string
+ error:
+ type: string
+ required:
+ - done
+ - id
+ - update_time
+ type: object
RefsDump:
example:
tags_meta_range_id: tags_meta_range_id
diff --git a/clients/java/docs/RepositoriesApi.md b/clients/java/docs/RepositoriesApi.md
index bcadabca595..e18922f15bb 100644
--- a/clients/java/docs/RepositoriesApi.md
+++ b/clients/java/docs/RepositoriesApi.md
@@ -7,11 +7,15 @@ All URIs are relative to */api/v1*
| [**createRepository**](RepositoriesApi.md#createRepository) | **POST** /repositories | create repository |
| [**deleteGCRules**](RepositoriesApi.md#deleteGCRules) | **DELETE** /repositories/{repository}/settings/gc_rules | |
| [**deleteRepository**](RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository |
+| [**dumpStatus**](RepositoriesApi.md#dumpStatus) | **GET** /repositories/{repository}/dump | Status of a repository dump task |
+| [**dumpSubmit**](RepositoriesApi.md#dumpSubmit) | **POST** /repositories/{repository}/dump | Backup the repository metadata (tags, commits, branches) and save the backup to the object store. |
| [**getBranchProtectionRules**](RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules |
| [**getGCRules**](RepositoriesApi.md#getGCRules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules |
| [**getRepository**](RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository |
| [**getRepositoryMetadata**](RepositoriesApi.md#getRepositoryMetadata) | **GET** /repositories/{repository}/metadata | get repository metadata |
| [**listRepositories**](RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories |
+| [**restoreStatus**](RepositoriesApi.md#restoreStatus) | **GET** /repositories/{repository}/restore | Status of a restore request |
+| [**restoreSubmit**](RepositoriesApi.md#restoreSubmit) | **POST** /repositories/{repository}/restore | Restore repository from a dump in the object store |
| [**setBranchProtectionRules**](RepositoriesApi.md#setBranchProtectionRules) | **PUT** /repositories/{repository}/settings/branch_protection | |
| [**setGCRules**](RepositoriesApi.md#setGCRules) | **PUT** /repositories/{repository}/settings/gc_rules | |
@@ -297,6 +301,195 @@ null (empty response body)
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
+
+# **dumpStatus**
+> RepositoryDumpStatus dumpStatus(repository, taskId).execute();
+
+Status of a repository dump task
+
+### Example
+```java
+// Import classes:
+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);
+ String repository = "repository_example"; // String |
+ String taskId = "taskId_example"; // String |
+ try {
+ RepositoryDumpStatus result = apiInstance.dumpStatus(repository, taskId)
+ .execute();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#dumpStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **repository** | **String**| | |
+| **taskId** | **String**| | |
+
+### Return type
+
+[**RepositoryDumpStatus**](RepositoryDumpStatus.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | dump task status | - |
+| **400** | Validation Error | - |
+| **401** | Unauthorized | - |
+| **404** | Resource Not Found | - |
+| **420** | too many requests | - |
+| **0** | Internal Server Error | - |
+
+
+# **dumpSubmit**
+> TaskInfo dumpSubmit(repository).execute();
+
+Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
+
+### Example
+```java
+// Import classes:
+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);
+ String repository = "repository_example"; // String |
+ try {
+ TaskInfo result = apiInstance.dumpSubmit(repository)
+ .execute();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#dumpSubmit");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **repository** | **String**| | |
+
+### Return type
+
+[**TaskInfo**](TaskInfo.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **202** | dump task information | - |
+| **400** | Validation Error | - |
+| **401** | Unauthorized | - |
+| **404** | Resource Not Found | - |
+| **0** | Internal Server Error | - |
+
# **getBranchProtectionRules**
> List<BranchProtectionRule> getBranchProtectionRules(repository).execute();
@@ -768,6 +961,197 @@ public class Example {
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
+
+# **restoreStatus**
+> RepositoryRestoreStatus restoreStatus(repository, taskId).execute();
+
+Status of a restore request
+
+### Example
+```java
+// Import classes:
+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);
+ String repository = "repository_example"; // String |
+ String taskId = "taskId_example"; // String |
+ try {
+ RepositoryRestoreStatus result = apiInstance.restoreStatus(repository, taskId)
+ .execute();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#restoreStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **repository** | **String**| | |
+| **taskId** | **String**| | |
+
+### Return type
+
+[**RepositoryRestoreStatus**](RepositoryRestoreStatus.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | restore task status | - |
+| **400** | Validation Error | - |
+| **401** | Unauthorized | - |
+| **404** | Resource Not Found | - |
+| **420** | too many requests | - |
+| **0** | Internal Server Error | - |
+
+
+# **restoreSubmit**
+> TaskInfo restoreSubmit(repository, refsDump).execute();
+
+Restore repository from a dump in the object store
+
+### Example
+```java
+// Import classes:
+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);
+ String repository = "repository_example"; // String |
+ RefsDump refsDump = new RefsDump(); // RefsDump |
+ try {
+ TaskInfo result = apiInstance.restoreSubmit(repository, refsDump)
+ .execute();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RepositoriesApi#restoreSubmit");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **repository** | **String**| | |
+| **refsDump** | [**RefsDump**](RefsDump.md)| | |
+
+### Return type
+
+[**TaskInfo**](TaskInfo.md)
+
+### Authorization
+
+[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **202** | restore task created | - |
+| **400** | Validation Error | - |
+| **401** | Unauthorized | - |
+| **404** | Resource Not Found | - |
+| **0** | Internal Server Error | - |
+
# **setBranchProtectionRules**
> setBranchProtectionRules(repository, branchProtectionRule).ifMatch(ifMatch).execute();
diff --git a/clients/java/docs/RepositoryDumpStatus.md b/clients/java/docs/RepositoryDumpStatus.md
new file mode 100644
index 00000000000..2f00b15c709
--- /dev/null
+++ b/clients/java/docs/RepositoryDumpStatus.md
@@ -0,0 +1,17 @@
+
+
+# RepositoryDumpStatus
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | ID of the task | |
+|**done** | **Boolean** | | |
+|**updateTime** | **OffsetDateTime** | | |
+|**error** | **String** | | [optional] |
+|**refs** | [**RefsDump**](RefsDump.md) | | [optional] |
+
+
+
diff --git a/clients/java/docs/RepositoryRestoreStatus.md b/clients/java/docs/RepositoryRestoreStatus.md
new file mode 100644
index 00000000000..73f648d0828
--- /dev/null
+++ b/clients/java/docs/RepositoryRestoreStatus.md
@@ -0,0 +1,16 @@
+
+
+# RepositoryRestoreStatus
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | ID of the task | |
+|**done** | **Boolean** | | |
+|**updateTime** | **OffsetDateTime** | | |
+|**error** | **String** | | [optional] |
+
+
+
diff --git a/clients/java/docs/TaskInfo.md b/clients/java/docs/TaskInfo.md
new file mode 100644
index 00000000000..4bf03879252
--- /dev/null
+++ b/clients/java/docs/TaskInfo.md
@@ -0,0 +1,13 @@
+
+
+# TaskInfo
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | ID of the task | |
+
+
+
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/JSON.java b/clients/java/src/main/java/io/lakefs/clients/sdk/JSON.java
index 19594a07b46..a0deb1f7e0b 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/JSON.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/JSON.java
@@ -158,7 +158,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.RefsDump.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.Repository.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.RepositoryCreation.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.RepositoryDumpStatus.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.RepositoryList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.RepositoryRestoreStatus.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.ResetCreation.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.RevertCreation.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.Setup.CustomTypeAdapterFactory());
@@ -171,6 +173,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.StorageConfig.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.StorageURI.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.TagCreation.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.TaskInfo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.UnderlyingObjectProperties.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.UpdateToken.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.sdk.model.User.CustomTypeAdapterFactory());
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/RepositoriesApi.java b/clients/java/src/main/java/io/lakefs/clients/sdk/RepositoriesApi.java
index 516d0a500aa..e6b101a9f9a 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/RepositoriesApi.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/RepositoriesApi.java
@@ -30,9 +30,13 @@
import io.lakefs.clients.sdk.model.BranchProtectionRule;
import io.lakefs.clients.sdk.model.Error;
import io.lakefs.clients.sdk.model.GarbageCollectionRules;
+import io.lakefs.clients.sdk.model.RefsDump;
import io.lakefs.clients.sdk.model.Repository;
import io.lakefs.clients.sdk.model.RepositoryCreation;
+import io.lakefs.clients.sdk.model.RepositoryDumpStatus;
import io.lakefs.clients.sdk.model.RepositoryList;
+import io.lakefs.clients.sdk.model.RepositoryRestoreStatus;
+import io.lakefs.clients.sdk.model.TaskInfo;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -605,7 +609,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
public APIdeleteRepositoryRequest deleteRepository(String repository) {
return new APIdeleteRepositoryRequest(repository);
}
- private okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call dumpStatusCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -622,7 +626,7 @@ private okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCa
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/repositories/{repository}/settings/branch_protection"
+ String localVarPath = "/repositories/{repository}/dump"
.replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
@@ -631,6 +635,10 @@ private okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCa
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (taskId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("task_id", taskId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -651,47 +659,55 @@ private okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCa
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getBranchProtectionRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call dumpStatusValidateBeforeCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling getBranchProtectionRules(Async)");
+ throw new ApiException("Missing the required parameter 'repository' when calling dumpStatus(Async)");
}
- return getBranchProtectionRulesCall(repository, _callback);
+ // verify the required parameter 'taskId' is set
+ if (taskId == null) {
+ throw new ApiException("Missing the required parameter 'taskId' when calling dumpStatus(Async)");
+ }
+
+ return dumpStatusCall(repository, taskId, _callback);
}
- private ApiResponse> getBranchProtectionRulesWithHttpInfo(String repository) throws ApiException {
- okhttp3.Call localVarCall = getBranchProtectionRulesValidateBeforeCall(repository, null);
- Type localVarReturnType = new TypeToken>(){}.getType();
+ private ApiResponse dumpStatusWithHttpInfo(String repository, String taskId) throws ApiException {
+ okhttp3.Call localVarCall = dumpStatusValidateBeforeCall(repository, taskId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
- private okhttp3.Call getBranchProtectionRulesAsync(String repository, final ApiCallback> _callback) throws ApiException {
+ private okhttp3.Call dumpStatusAsync(String repository, String taskId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getBranchProtectionRulesValidateBeforeCall(repository, _callback);
- Type localVarReturnType = new TypeToken>(){}.getType();
+ okhttp3.Call localVarCall = dumpStatusValidateBeforeCall(repository, taskId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- public class APIgetBranchProtectionRulesRequest {
+ public class APIdumpStatusRequest {
private final String repository;
+ private final String taskId;
- private APIgetBranchProtectionRulesRequest(String repository) {
+ private APIdumpStatusRequest(String repository, String taskId) {
this.repository = repository;
+ this.taskId = taskId;
}
/**
- * Build call for getBranchProtectionRules
+ * Build call for dumpStatus
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code | Description | Response Headers |
- 200 | branch protection rules | * ETag - |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -699,85 +715,90 @@ private APIgetBranchProtectionRulesRequest(String repository) {
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return getBranchProtectionRulesCall(repository, _callback);
+ return dumpStatusCall(repository, taskId, _callback);
}
/**
- * Execute getBranchProtectionRules request
- * @return List<BranchProtectionRule>
+ * Execute dumpStatus request
+ * @return RepositoryDumpStatus
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code | Description | Response Headers |
- 200 | branch protection rules | * ETag - |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public List execute() throws ApiException {
- ApiResponse> localVarResp = getBranchProtectionRulesWithHttpInfo(repository);
+ public RepositoryDumpStatus execute() throws ApiException {
+ ApiResponse localVarResp = dumpStatusWithHttpInfo(repository, taskId);
return localVarResp.getData();
}
/**
- * Execute getBranchProtectionRules request with HTTP info returned
- * @return ApiResponse<List<BranchProtectionRule>>
+ * Execute dumpStatus request with HTTP info returned
+ * @return ApiResponse<RepositoryDumpStatus>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code | Description | Response Headers |
- 200 | branch protection rules | * ETag - |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public ApiResponse> executeWithHttpInfo() throws ApiException {
- return getBranchProtectionRulesWithHttpInfo(repository);
+ public ApiResponse executeWithHttpInfo() throws ApiException {
+ return dumpStatusWithHttpInfo(repository, taskId);
}
/**
- * Execute getBranchProtectionRules request (asynchronously)
+ * Execute dumpStatus request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code | Description | Response Headers |
- 200 | branch protection rules | * ETag - |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
- return getBranchProtectionRulesAsync(repository, _callback);
+ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
+ return dumpStatusAsync(repository, taskId, _callback);
}
}
/**
- * get branch protection rules
+ * Status of a repository dump task
*
* @param repository (required)
- * @return APIgetBranchProtectionRulesRequest
+ * @param taskId (required)
+ * @return APIdumpStatusRequest
* @http.response.details
Status Code | Description | Response Headers |
- 200 | branch protection rules | * ETag - |
+ 200 | dump task status | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public APIgetBranchProtectionRulesRequest getBranchProtectionRules(String repository) {
- return new APIgetBranchProtectionRulesRequest(repository);
+ public APIdumpStatusRequest dumpStatus(String repository, String taskId) {
+ return new APIdumpStatusRequest(repository, taskId);
}
- private okhttp3.Call getGCRulesCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call dumpSubmitCall(String repository, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -794,7 +815,7 @@ private okhttp3.Call getGCRulesCall(String repository, final ApiCallback _callba
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/repositories/{repository}/settings/gc_rules"
+ String localVarPath = "/repositories/{repository}/dump"
.replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
@@ -819,137 +840,137 @@ private okhttp3.Call getGCRulesCall(String repository, final ApiCallback _callba
}
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" };
- return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getGCRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call dumpSubmitValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling getGCRules(Async)");
+ throw new ApiException("Missing the required parameter 'repository' when calling dumpSubmit(Async)");
}
- return getGCRulesCall(repository, _callback);
+ return dumpSubmitCall(repository, _callback);
}
- private ApiResponse getGCRulesWithHttpInfo(String repository) throws ApiException {
- okhttp3.Call localVarCall = getGCRulesValidateBeforeCall(repository, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ private ApiResponse dumpSubmitWithHttpInfo(String repository) throws ApiException {
+ okhttp3.Call localVarCall = dumpSubmitValidateBeforeCall(repository, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
- private okhttp3.Call getGCRulesAsync(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call dumpSubmitAsync(String repository, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getGCRulesValidateBeforeCall(repository, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = dumpSubmitValidateBeforeCall(repository, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- public class APIgetGCRulesRequest {
+ public class APIdumpSubmitRequest {
private final String repository;
- private APIgetGCRulesRequest(String repository) {
+ private APIdumpSubmitRequest(String repository) {
this.repository = repository;
}
/**
- * Build call for getGCRules
+ * Build call for dumpSubmit
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository GC rules | - |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
- 420 | too many requests | - |
0 | Internal Server Error | - |
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return getGCRulesCall(repository, _callback);
+ return dumpSubmitCall(repository, _callback);
}
/**
- * Execute getGCRules request
- * @return GarbageCollectionRules
+ * Execute dumpSubmit request
+ * @return TaskInfo
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository GC rules | - |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
- 420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public GarbageCollectionRules execute() throws ApiException {
- ApiResponse localVarResp = getGCRulesWithHttpInfo(repository);
+ public TaskInfo execute() throws ApiException {
+ ApiResponse localVarResp = dumpSubmitWithHttpInfo(repository);
return localVarResp.getData();
}
/**
- * Execute getGCRules request with HTTP info returned
- * @return ApiResponse<GarbageCollectionRules>
+ * Execute dumpSubmit request with HTTP info returned
+ * @return ApiResponse<TaskInfo>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository GC rules | - |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
- 420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public ApiResponse executeWithHttpInfo() throws ApiException {
- return getGCRulesWithHttpInfo(repository);
+ public ApiResponse executeWithHttpInfo() throws ApiException {
+ return dumpSubmitWithHttpInfo(repository);
}
/**
- * Execute getGCRules request (asynchronously)
+ * Execute dumpSubmit request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository GC rules | - |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
- 420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return getGCRulesAsync(repository, _callback);
+ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
+ return dumpSubmitAsync(repository, _callback);
}
}
/**
- * get repository GC rules
+ * Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
*
* @param repository (required)
- * @return APIgetGCRulesRequest
+ * @return APIdumpSubmitRequest
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository GC rules | - |
+ 202 | dump task information | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
- 420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public APIgetGCRulesRequest getGCRules(String repository) {
- return new APIgetGCRulesRequest(repository);
+ public APIdumpSubmitRequest dumpSubmit(String repository) {
+ return new APIdumpSubmitRequest(repository);
}
- private okhttp3.Call getRepositoryCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -966,7 +987,7 @@ private okhttp3.Call getRepositoryCall(String repository, final ApiCallback _cal
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/repositories/{repository}"
+ String localVarPath = "/repositories/{repository}/settings/branch_protection"
.replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
@@ -995,47 +1016,47 @@ private okhttp3.Call getRepositoryCall(String repository, final ApiCallback _cal
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getRepositoryValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getBranchProtectionRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling getRepository(Async)");
+ throw new ApiException("Missing the required parameter 'repository' when calling getBranchProtectionRules(Async)");
}
- return getRepositoryCall(repository, _callback);
+ return getBranchProtectionRulesCall(repository, _callback);
}
- private ApiResponse getRepositoryWithHttpInfo(String repository) throws ApiException {
- okhttp3.Call localVarCall = getRepositoryValidateBeforeCall(repository, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ private ApiResponse> getBranchProtectionRulesWithHttpInfo(String repository) throws ApiException {
+ okhttp3.Call localVarCall = getBranchProtectionRulesValidateBeforeCall(repository, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
- private okhttp3.Call getRepositoryAsync(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getBranchProtectionRulesAsync(String repository, final ApiCallback> _callback) throws ApiException {
- okhttp3.Call localVarCall = getRepositoryValidateBeforeCall(repository, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = getBranchProtectionRulesValidateBeforeCall(repository, _callback);
+ Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- public class APIgetRepositoryRequest {
+ public class APIgetBranchProtectionRulesRequest {
private final String repository;
- private APIgetRepositoryRequest(String repository) {
+ private APIgetBranchProtectionRulesRequest(String repository) {
this.repository = repository;
}
/**
- * Build call for getRepository
+ * Build call for getBranchProtectionRules
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository | - |
+ 200 | branch protection rules | * ETag - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -1043,85 +1064,85 @@ private APIgetRepositoryRequest(String repository) {
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return getRepositoryCall(repository, _callback);
+ return getBranchProtectionRulesCall(repository, _callback);
}
/**
- * Execute getRepository request
- * @return Repository
+ * Execute getBranchProtectionRules request
+ * @return List<BranchProtectionRule>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository | - |
+ 200 | branch protection rules | * ETag - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public Repository execute() throws ApiException {
- ApiResponse localVarResp = getRepositoryWithHttpInfo(repository);
+ public List execute() throws ApiException {
+ ApiResponse> localVarResp = getBranchProtectionRulesWithHttpInfo(repository);
return localVarResp.getData();
}
/**
- * Execute getRepository request with HTTP info returned
- * @return ApiResponse<Repository>
+ * Execute getBranchProtectionRules request with HTTP info returned
+ * @return ApiResponse<List<BranchProtectionRule>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository | - |
+ 200 | branch protection rules | * ETag - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public ApiResponse executeWithHttpInfo() throws ApiException {
- return getRepositoryWithHttpInfo(repository);
+ public ApiResponse> executeWithHttpInfo() throws ApiException {
+ return getBranchProtectionRulesWithHttpInfo(repository);
}
/**
- * Execute getRepository request (asynchronously)
+ * Execute getBranchProtectionRules request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository | - |
+ 200 | branch protection rules | * ETag - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return getRepositoryAsync(repository, _callback);
+ public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
+ return getBranchProtectionRulesAsync(repository, _callback);
}
}
/**
- * get repository
+ * get branch protection rules
*
* @param repository (required)
- * @return APIgetRepositoryRequest
+ * @return APIgetBranchProtectionRulesRequest
* @http.response.details
Status Code | Description | Response Headers |
- 200 | repository | - |
+ 200 | branch protection rules | * ETag - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
0 | Internal Server Error | - |
*/
- public APIgetRepositoryRequest getRepository(String repository) {
- return new APIgetRepositoryRequest(repository);
+ public APIgetBranchProtectionRulesRequest getBranchProtectionRules(String repository) {
+ return new APIgetBranchProtectionRulesRequest(repository);
}
- private okhttp3.Call getRepositoryMetadataCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getGCRulesCall(String repository, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -1138,7 +1159,7 @@ private okhttp3.Call getRepositoryMetadataCall(String repository, final ApiCallb
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/repositories/{repository}/metadata"
+ String localVarPath = "/repositories/{repository}/settings/gc_rules"
.replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
@@ -1167,47 +1188,47 @@ private okhttp3.Call getRepositoryMetadataCall(String repository, final ApiCallb
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getRepositoryMetadataValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getGCRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling getRepositoryMetadata(Async)");
+ throw new ApiException("Missing the required parameter 'repository' when calling getGCRules(Async)");
}
- return getRepositoryMetadataCall(repository, _callback);
+ return getGCRulesCall(repository, _callback);
}
- private ApiResponse