{ "openapi": "3.0.0", "info": { "title": "public/portworx/pds/restore/apiv1/restore.proto", "version": "version not set" }, "tags": [ { "name": "RestoreService" } ], "paths": { "/pds/v1/namespaces/{namespaceId}/restores": { "post": { "summary": "CreateRestore API creates the Restore resource.", "operationId": "RestoreService_CreateRestore", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Restore" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "namespaceId", "description": "UID of the namespace where restore will be created.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreServiceCreateRestoreBody" } } }, "required": true }, "tags": [ "RestoreService" ] } }, "/pds/v1/restores": { "get": { "summary": "ListRestore API lists the Restore resources.", "operationId": "RestoreService_ListRestores", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListRestoresResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "tenantId", "description": "Tenant (Organization) ID for which the restore will be listed.", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "projectId", "description": "Project ID for which the restore will be listed.", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "dataServiceDeploymentId", "description": "Deployment ID for which the restore will be listed.", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "backupId", "description": "Backup ID for which the restore will be listed.", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "sort.sortBy", "description": "Name of the attribute to sort results by.\n\n - FIELD_UNSPECIFIED: Unspecified, do not use.\n - NAME: Sorting based on the name of the resource.\n - CREATED_AT: Sorting on create time of the resource.\n - UPDATED_AT: Sorting on update time of the resource.\n - PHASE: Sorting on phase of the resource.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "FIELD_UNSPECIFIED", "NAME", "CREATED_AT", "UPDATED_AT", "PHASE" ], "default": "FIELD_UNSPECIFIED" } }, { "name": "sort.sortOrder", "description": "Order of sorting to be applied on requested list.\nIf sort_by having some value and sort_order is not provided, by default ascending order will be used to sort the list.\n\n - VALUE_UNSPECIFIED: Unspecified, do not use.\n - ASC: Sort order ascending.\n - DESC: Sort order descending.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "VALUE_UNSPECIFIED", "ASC", "DESC" ], "default": "VALUE_UNSPECIFIED" } }, { "name": "pagination.pageNumber", "description": "Page number is the page number to return based on the size.", "in": "query", "required": false, "schema": { "type": "string", "format": "int64" } }, { "name": "pagination.pageSize", "description": "Page size is the maximum number of records to include per page.", "in": "query", "required": false, "schema": { "type": "string", "format": "int64" } } ], "tags": [ "RestoreService" ] } }, "/pds/v1/restores/{id}": { "get": { "summary": "GetRestore API returns the Restore resource.", "operationId": "RestoreService_GetRestore", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Restore" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "id", "description": "UID of the restore.", "in": "path", "required": true, "schema": { "type": "string" } } ], "tags": [ "RestoreService" ] } }, "/pds/v1/restores/{id}:recreate": { "post": { "summary": "RecreateRestore API recreates a already failed restore.", "operationId": "RestoreService_RecreateRestore", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Restore" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "id", "description": "UID of the existing restore.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreServiceRecreateRestoreBody" } } }, "required": true }, "tags": [ "RestoreService" ] } } }, "components": { "schemas": { "RestoreServiceCreateRestoreBody": { "type": "object", "properties": { "projectId": { "type": "string", "description": "UID of the project associated with the restore." }, "restore": { "$ref": "#/components/schemas/v1Restore" } }, "description": "Request to create a restore.", "required": [ "projectId", "restore" ] }, "RestoreServiceRecreateRestoreBody": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the restore." }, "projectId": { "type": "string", "description": "UID of the project associated with the restore." }, "namespaceId": { "type": "string", "description": "UID of namespace where restore will be created." } }, "description": "Request to recreate a restore.", "required": [ "name", "projectId", "namespaceId" ] }, "SortByField": { "type": "string", "enum": [ "FIELD_UNSPECIFIED", "NAME", "CREATED_AT", "UPDATED_AT", "PHASE" ], "default": "FIELD_UNSPECIFIED", "description": "Field names for sorting the list of resources.\n\n - FIELD_UNSPECIFIED: Unspecified, do not use.\n - NAME: Sorting based on the name of the resource.\n - CREATED_AT: Sorting on create time of the resource.\n - UPDATED_AT: Sorting on update time of the resource.\n - PHASE: Sorting on phase of the resource." }, "SortOrderValue": { "type": "string", "enum": [ "VALUE_UNSPECIFIED", "ASC", "DESC" ], "default": "VALUE_UNSPECIFIED", "description": "Value of sort order for the list of resources.\n\n - VALUE_UNSPECIFIED: Unspecified, do not use.\n - ASC: Sort order ascending.\n - DESC: Sort order descending." }, "googlerpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/protobufAny" } } } }, "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": {} }, "restorev1Status": { "type": "object", "properties": { "startedAt": { "type": "string", "format": "date-time", "description": "\nTime when restore was started." }, "completedAt": { "type": "string", "format": "date-time", "description": "\nTime when restore was completed." }, "errorCode": { "$ref": "#/components/schemas/v1ErrorCode" }, "errorMessage": { "type": "string", "description": "Error message is description of the error in restore." }, "phase": { "$ref": "#/components/schemas/v1Phase" }, "customResourceName": { "type": "string", "description": "Custom Resource Name is the kubernetes resource name for the restore that is built from ID." } }, "description": "Status of the restore." }, "v1Config": { "type": "object", "properties": { "sourceReferences": { "$ref": "#/components/schemas/v1SourceReferences" }, "destinationReferences": { "$ref": "#/components/schemas/v1DestinationReferences" }, "customResourceName": { "type": "string", "description": "K8s resource name for restore, built from [\"restore-\" + name + short-id].", "readOnly": true }, "podSchedulingConfig": { "$ref": "#/components/schemas/v1PodSchedulingConfig" } }, "description": "Desired configuration of the restore." }, "v1DestinationReferences": { "type": "object", "properties": { "targetClusterId": { "type": "string", "description": "UID of the target cluster where restore will be created.", "readOnly": true }, "dataServiceDeploymentId": { "type": "string", "description": "UID of the deployment created by the restore.", "readOnly": true }, "projectId": { "type": "string", "description": "UID of the project.", "readOnly": true } }, "description": "Destination references for the restore." }, "v1ErrorCode": { "type": "string", "enum": [ "ERROR_CODE_UNSPECIFIED", "DATA_SERVICE_DEPLOYMENT_NAME_ALREADY_EXIST", "FAILED_BACKUP_CREDENTIAL_SYNC", "RESTORE_INTERNAL_ERROR" ], "default": "ERROR_CODE_UNSPECIFIED", "description": "Enums for error codes for restore on the target cluster.\n\n - ERROR_CODE_UNSPECIFIED: Error code not specified.\n - DATA_SERVICE_DEPLOYMENT_NAME_ALREADY_EXIST: Deployment name already used in the namespace.\n - FAILED_BACKUP_CREDENTIAL_SYNC: Failed to sync backup credentials on the target cluster.\n - RESTORE_INTERNAL_ERROR: Restore Internal error." }, "v1ListRestoresResponse": { "type": "object", "properties": { "restores": { "type": "array", "items": { "$ref": "#/components/schemas/v1Restore" }, "description": "List of restores." }, "pagination": { "$ref": "#/components/schemas/v1PageBasedPaginationResponse" } }, "description": "ListRestoresResponse represents list restores response." }, "v1Meta": { "type": "object", "properties": { "uid": { "type": "string", "description": "UID of the resource of the format -." }, "name": { "type": "string", "description": "Name of the resource." }, "description": { "type": "string", "description": "Description of the resource." }, "resourceVersion": { "type": "string", "description": "A string that identifies the version of this object that can be used by clients to determine when objects have changed.\nThis value must be passed unmodified back to the server by the client." }, "createTime": { "type": "string", "format": "date-time", "description": "Creation time of the object.", "readOnly": true }, "updateTime": { "type": "string", "format": "date-time", "description": "Update time of the object.", "readOnly": true }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Labels to apply to the object." }, "annotations": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Annotations for the object." }, "parentReference": { "$ref": "#/components/schemas/v1Reference" }, "resourceNames": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource names holds the mapping between the resource IDs and its display name which will be consumed by the frontend.", "readOnly": true } }, "description": "Meta holds general resource metadata." }, "v1PageBasedPaginationRequest": { "type": "object", "properties": { "pageNumber": { "type": "string", "format": "int64", "description": "Page number is the page number to return based on the size." }, "pageSize": { "type": "string", "format": "int64", "description": "Page size is the maximum number of records to include per page." } }, "description": "Request parameters for page-based pagination." }, "v1PageBasedPaginationResponse": { "type": "object", "properties": { "totalRecords": { "type": "string", "format": "int64", "description": "Total records without pagination available in the dataset." }, "currentPage": { "type": "string", "format": "int64", "description": "Current page number for this paginated response." }, "pageSize": { "type": "string", "format": "int64", "description": "Page size used for pagination." }, "totalPages": { "type": "string", "format": "int64", "description": "Total pages based on the page_size provided in the request." }, "nextPage": { "type": "string", "format": "int64", "description": "Next page if available in the dataset, -1 if unavailable." }, "prevPage": { "type": "string", "format": "int64", "description": "Previous page if available in the dataset, -1 if unavailable." } }, "description": "Metadata related to page based pagination for paginated API responses." }, "v1Phase": { "type": "string", "enum": [ "PHASE_UNSPECIFIED", "INITIALIZING", "PENDING", "RESTORING_CLOUDSNAP", "RESTORING_DATA_SERVICE_DEPLOYMENT_CR", "RESTORING_DATA_SERVICE_DEPLOYMENT", "DATA_SERVICE_DEPLOYMENT_ENTERING_NORMAL_MODE", "SUCCESSFUL", "FAILED" ], "default": "PHASE_UNSPECIFIED", "description": "Enum for phase of the restore.\n\n - PHASE_UNSPECIFIED: Phase is unspecified.\n - INITIALIZING: Restore is initializing.\n - PENDING: Restore has not yet started.\n - RESTORING_CLOUDSNAP: Waiting for the cloud snap restore to complete.\n - RESTORING_DATA_SERVICE_DEPLOYMENT_CR: PV and PVC resources are ready and we're waiting to get the data service deployment manifest from the backup.\n - RESTORING_DATA_SERVICE_DEPLOYMENT: New data service deployment has been created and we're waiting for the restore process to complete.\n - DATA_SERVICE_DEPLOYMENT_ENTERING_NORMAL_MODE: Restore process in data service deployment has succeeded and we're waiting until it becomes healthy in normal mode.\n - SUCCESSFUL: Restore successful.\n - FAILED: Restore failed." }, "v1PodSchedulingConfig": { "type": "object", "properties": { "tolerations": { "type": "array", "items": { "$ref": "#/components/schemas/v1Toleration" }, "description": "Tolerations to be applied on the application pods." } }, "description": "PodSchedulingConfig represents the configuration for scheduling pods." }, "v1Reference": { "type": "object", "properties": { "type": { "type": "string", "description": "API group of the resource." }, "version": { "type": "string", "description": "Version of the API." }, "uid": { "type": "string", "description": "UID of the resource." } }, "description": "Reference identifies the resource type, version of the uid and the resource." }, "v1Restore": { "type": "object", "properties": { "meta": { "$ref": "#/components/schemas/v1Meta" }, "config": { "$ref": "#/components/schemas/v1Config" }, "status": { "$ref": "#/components/schemas/restorev1Status" } }, "description": "Restore represents a data service restore." }, "v1Sort": { "type": "object", "properties": { "sortBy": { "$ref": "#/components/schemas/SortByField" }, "sortOrder": { "$ref": "#/components/schemas/SortOrderValue" } }, "description": "The details of the attribute for which the requested list of resource to be sorted." }, "v1SourceReferences": { "type": "object", "properties": { "dataServiceDeploymentId": { "type": "string", "description": "UID of the deployment which was backed up.", "readOnly": true }, "backupId": { "type": "string", "description": "UID of the backup." }, "backupLocationId": { "type": "string", "description": "UID of the backup location.", "readOnly": true }, "cloudsnapId": { "type": "string", "description": "UID of the cloud snapshot of the backup volume used for restore.", "readOnly": true } }, "description": "SourceReferences for the restore.", "required": [ "backupId" ] }, "v1Toleration": { "type": "object", "properties": { "key": { "type": "string", "description": "Key is the key of the toleration." }, "operator": { "type": "string", "description": "Operator is the operator for the toleration.\nValid operators are Exists, Equal.\nDefaults to \"Equal\" if not specified." }, "value": { "type": "string", "description": "Value is the value of the toleration." }, "effect": { "type": "string", "description": "Effect is the effect for the toleration.\nValid effects are NoSchedule, PreferNoSchedule, NoExecute.\nAn empty effect matches all effects." } }, "description": "Toleration represents a Kubernetes toleration." } } } }