import type { ExampleMultipartFormData } from '../models/ExampleMultipartFormData.js'; import type { FileInfo } from '../models/FileInfo.js'; import type { JobDetails } from '../models/JobDetails.js'; import type { SiteBackupJobDetails } from '../models/SiteBackupJobDetails.js'; import type { SiteBackupSettings } from '../models/SiteBackupSettings.js'; import type { SiteRestoreJobDetails } from '../models/SiteRestoreJobDetails.js'; import type { SiteRestoreSettings } from '../models/SiteRestoreSettings.js'; import type { SpaceBackupJobDetails } from '../models/SpaceBackupJobDetails.js'; import type { SpaceBackupSettings } from '../models/SpaceBackupSettings.js'; import type { SpaceRestoreJobDetails } from '../models/SpaceRestoreJobDetails.js'; import type { SpaceRestoreSettings } from '../models/SpaceRestoreSettings.js'; import type { CancelablePromise } from '../core/CancelablePromise.js'; export declare class BackupAndRestoreService { /** * Cancel all queued jobs * Cancels all queued jobs. Does not affect jobs that are being processed at the moment. * @returns any Returns the number of cancelled jobs. If no jobs were cancelled, 0 is returned. * Example response: `1` * @throws ApiError */ static cancelAllQueuedJobs(): CancelablePromise; /** * Cancel job * Cancels the job. If the job is already cancelled or failed, the method will do nothing. * @param jobId id of the backup/restore job * @returns JobDetails Returns a JSON representation of the cancelled job. * @throws ApiError */ static cancelJob(jobId: string): CancelablePromise; /** * Create site backup job * Starts the new site backup job. * @param requestBody Site backup settings * @returns SiteBackupJobDetails Returns a JSON representation of the site backup job details. * @throws ApiError */ static createSiteBackupJob(requestBody?: SiteBackupSettings): CancelablePromise; /** * Create site restore job * Starts the new site restore job. * @param requestBody space restore settings * @returns SiteRestoreJobDetails Returns a JSON representation of the site restore job. * @throws ApiError */ static createSiteRestoreJob(requestBody?: SiteRestoreSettings): CancelablePromise; /** * Create site restore job for upload backup file * This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. * * Most client libraries have classes that make dealing with multipart posts simple. * * For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. * * In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked. * * The name of the multipart/form-data parameter that contains attachments must be "file". * * An example to attach the file: * * curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F file=@myfile.zip http://myhost/rest/api/backup-restore/restore/space/upload * * . * @param formData Backup file to be uploaded. Has to be a zip file. * @returns SiteRestoreJobDetails Returns a JSON representation of the site restore job details. * @throws ApiError */ static createSiteRestoreJobForUploadedBackupFile(formData?: ExampleMultipartFormData): CancelablePromise; /** * Create space backup job * Creates new space backup job and adds it to the queue. * @param requestBody Space backup settings * @returns SpaceBackupJobDetails Returns a JSON representation of the space backup job * @throws ApiError */ static createSpaceBackupJob(requestBody?: SpaceBackupSettings): CancelablePromise; /** * Create space restore job * Creates new space restore job and adds it to the queue. * @param requestBody space restore settings * @returns SpaceRestoreJobDetails Returns a JSON representation of the space restore job. * @throws ApiError */ static createSpaceRestoreJob(requestBody?: SpaceRestoreSettings): CancelablePromise; /** * Create space restore job for upload backup file * This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. * * Most client libraries have classes that make dealing with multipart posts simple. * * For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. * * In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked. * * The name of the multipart/form-data parameter that contains attachments must be "file". * * An example to attach the file: * * curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F file=@myfile.zip http://myhost/rest/api/backup-restore/restore/space/upload * * . * @param formData backup file uploaded. Has to be a zip file. * @returns SpaceRestoreJobDetails Returns a JSON representation of the space restore job details. * @throws ApiError */ static createSpaceRestoreJobForUploadedBackupFile(formData?: ExampleMultipartFormData): CancelablePromise; /** * Download backup file * Downloads the backup file for the given job. Requires site admin or space export permissions for all spaces included in the backup job. * @param jobId id of the backup/restore job * @returns JobDetails Returns a data stream of the backup file content. * @throws ApiError */ static downloadBackupFile(jobId: string): CancelablePromise; /** * Find jobs by filters * Returns jobs based on the filters provided. The user must have permission to see the jobs. * @param owner userName of user who had created a job. * @param spaceKey the key of the Space the User is attempting to view. * @param fromDate minimum job creation date. Supported date format is `yyyy-MM-ddTHH:mm:ss.SSSZ` * @param jobStates list of job states. Acceptable values: "QUEUED", "PROCESSING", "FINISHED", "CANCELLING", "CANCELLED", "FAILED" * @param toDate maximum job create date. Supported date format is `yyyy-MM-ddTHH:mm:ss.SSSZ` * @param jobOperation job operation. Acceptable values: "BACKUP" and "RESTORE" * @param limit amount of jobs that should be returned * @param jobScope scope of the job. Acceptable values: "SPACE" and "SITE" * @returns JobDetails Returns the List of backup/restore jobs visible to user based on the filter provided and the user's permissions. * @throws ApiError */ static findJobs(owner?: string, spaceKey?: string, fromDate?: string, jobStates?: string, toDate?: string, jobOperation?: string, limit?: string, jobScope?: string): CancelablePromise>; /** * Get files in restore directory * returns list of information on files in conf-home/restore/(jobScope). * @param jobScope name of type of restore job (SITE or SPACE or null), if null, all backup files are listed * @returns FileInfo Returns a list of FileInfo objects, containing fileName, fileCreationTime, fileSize, and jobScope. * @throws ApiError */ static getFiles(jobScope?: string): CancelablePromise>; /** * Get job by ID * Get job by id. The user must be a sysadmin or the owner of the job. * @param jobId id of the backup/restore job * @returns JobDetails Returns a JSON representation of the backup/restore job * @throws ApiError */ static getJob(jobId: string): CancelablePromise; } //# sourceMappingURL=BackupAndRestoreService.d.ts.map