openapi: 3.2.0 info: title: Job Management for Cloud Workloads Azure SQL API version: 1.0.0 servers: - url: //apis.druva.com/unity tags: - name: Azure SQL paths: /haydn/v1/azuresql/v1/jobs/backup: post: security: - Bearer: [] description: Initiates an on-demand backup for Azure SQL backupset. tags: - Azure SQL summary: On-demand backup operationId: CreateAzureSQLBackup parameters: - x-go-name: AuthEntities description: 'Specify the authorization information in the format: ''pType=org;pID=orgID'', where orgID is the ID of your organization. Get the ID of an organization using the ''List all organizations'' API.' name: authentities in: header required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBackupTriggerArgsAzureSQL' required: true x-go-name: Params responses: '200': description: Success content: '*/*': schema: $ref: '#/components/schemas/CreateBackupResponseAzureSQL' '400': description: For invalid or missing arguments. content: '*/*': schema: $ref: '#/components/schemas/APIError' '401': description: Invalid or lack of valid authentication credentials. content: '*/*': schema: $ref: '#/components/schemas/APIError' '500': description: Internal or unknown error. content: '*/*': schema: $ref: '#/components/schemas/APIError' /haydn/v1/azuresql/v1/jobs/backup/{jobID}/cancel: put: security: - Bearer: [] description: Cancels the specified backup job. tags: - Azure SQL summary: Cancel backup job operationId: CancelAzureSQLBackup parameters: - x-go-name: AuthEntities description: 'Specify the authorization information in the format: ''pType=org;pID=orgID'', where orgID is the ID of your organization. Get the ID of an organization using the ''List all organizations'' API.' name: authentities in: header required: true schema: type: string - x-go-name: JobID description: Specify the ID of the job that you want to cancel. Get the ID of the job using the 'List all jobs' API. name: jobID in: path required: true schema: type: integer format: int64 responses: '200': description: Success '400': description: For invalid or missing arguments. content: '*/*': schema: $ref: '#/components/schemas/APIError' '401': description: Invalid or lack of valid authentication credentials. content: '*/*': schema: $ref: '#/components/schemas/APIError' '500': description: Internal or unknown error. content: '*/*': schema: $ref: '#/components/schemas/APIError' /haydn/v1/azuresql/v1/jobs/restore: post: security: - Bearer: [] description: Initiates an on-demand restore for a Azure SQL backup set. tags: - Azure SQL summary: On-demand restore operationId: CreateAzureSQLRestore parameters: - x-go-name: AuthEntities description: 'Specify the authorization information in the format: ''pType=org;pID=orgID'', where orgID is the ID of your organization. Get the ID of an organization using the ''List all organizations'' API.' name: authentities in: header required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateRestoreTriggerArgsAzureSQL' required: true x-go-name: Params responses: '200': description: Success content: '*/*': schema: $ref: '#/components/schemas/CreateRestoreResponseAzureSQL' '400': description: For invalid or missing arguments. content: '*/*': schema: $ref: '#/components/schemas/APIError' '401': description: Invalid or lack of valid authentication credentials. content: '*/*': schema: $ref: '#/components/schemas/APIError' '500': description: Internal or unknown error. content: '*/*': schema: $ref: '#/components/schemas/APIError' /haydn/v1/azuresql/v1/jobs/restore/{jobID}/cancel: put: security: - Bearer: [] description: Cancels the specified restore job. tags: - Azure SQL summary: Cancel restore job operationId: CancelAzureSQLRestore parameters: - x-go-name: AuthEntities description: 'Specify the authorization information in the format: ''pType=org;pID=orgID'', where orgID is the ID of your organization. Get the ID of an organization using the ''List all organizations'' API.' name: authentities in: header required: true schema: type: string - x-go-name: JobID description: Specify the ID of the job that you want to cancel. Get the ID of the job using the 'List all jobs' API. name: jobID in: path required: true schema: type: integer format: int64 responses: '200': description: Success '400': description: For invalid or missing arguments. content: '*/*': schema: $ref: '#/components/schemas/APIError' '401': description: Invalid or lack of valid authentication credentials. content: '*/*': schema: $ref: '#/components/schemas/APIError' '500': description: Internal or unknown error. content: '*/*': schema: $ref: '#/components/schemas/APIError' components: schemas: JobParamsAzureSQL: description: Specify job parameters needed for restoring snapshot. type: object required: - newVmRegion properties: snapshotState: description: Specify state of the snapshot. For example, 'hot', 'warm' or 'cold'. type: string x-go-name: SnapshotState rpState: description: Specify recovery point state. For example, 'hot', 'warm' or 'cold'. type: string x-go-name: RpState newVmRegion: description: Specify the destination Azure region for VM restore. type: string x-go-name: NewVmRegion azsqlParams: $ref: '#/components/schemas/AzureSQLParams' x-go-package: git.druva.org/foundation/jobmgmt/haydn/spec/enterpriseworkload/restore/base APIError: description: APIError defines an application error result format type: object properties: code: type: string x-go-name: Code data: type: object additionalProperties: type: object x-go-name: Data message: type: string x-go-name: Message retryable: type: boolean x-go-name: Retry x-go-package: phoenix/vendor/druva.com/godevkit/errortype CreateBackupResponseAzureSQL: description: CreateResponse is response schema for Create Request type: object properties: job: $ref: '#/components/schemas/JobAzureSQL' x-go-name: CreateResponse x-go-package: git.druva.org/foundation/jobmgmt/haydn/spec/enterpriseworkload/backup/base AzureSQLParams: description: Specify Azure SQL specific parameters for database restore operations. type: object required: - selectedDBNames - targetEntityID - targetVMName properties: selectedDBNames: description: 'Specify mapping of source database names to target database objects for restore operation. For example "selectedDBNames": {"sourcedb": {"name": "targetdb", "type": "user"}}.' type: object additionalProperties: type: object properties: name: type: string description: Target database name type: type: string description: Database type required: - name - type x-go-name: SelectedDBNames targetEntityID: description: Specify unique identifier of the target SQL Server instance where databases will be restored. type: integer format: int32 x-go-name: TargetEntityID targetVMName: description: Specify name of the target virtual machine hosting the SQL Server instance. type: string x-go-name: TargetVMName targetLocationID: description: Specify identifier of the target Azure location/region for cross-region restore operations. type: integer format: int32 x-go-name: TargetLocationID targetAccountID: description: Specify identifier of the target Azure account for cross-account restore operation. type: integer format: int32 x-go-name: TargetAccountID targetConnectionID: description: Specify connection identifier for the target Azure environment/subscription. type: string x-go-name: TargetConnectionID pitTimestamp: description: Specify unix timestamp for point-in-time recovery to restore database to specific moment time.For example, '1704067200'. type: integer format: int64 x-go-name: PITTimestamp snapshotIDs: description: Specify Array of snapshot identifiers for multi-snapshot restore operations. type: array items: type: string x-go-name: SnapshotIDs x-go-package: git.druva.org/foundation/jobmgmt/haydn/spec/enterpriseworkload/restore/base CreateRestoreResponseAzureSQL: description: CreateResponse is response schema for Create Request type: object properties: job: $ref: '#/components/schemas/JobAzureSQL' x-go-name: CreateResponse x-go-package: git.druva.org/foundation/jobmgmt/haydn/spec/enterpriseworkload/restore/base CreateRestoreTriggerArgsAzureSQL: description: CreateRestoreTriggerArgs bundles all job creation params in single data type. type: object required: - backupsetID - snapshotID properties: backupsetID: description: Specify the ID of the backup set. Get the ID using the 'List backup sets' API. type: integer format: int32 x-go-name: BackupsetID jobParams: $ref: '#/components/schemas/JobParamsAzureSQL' restoreType: description: Specify "RegularRestore" as the restore type. type: string x-go-name: RestoreType snapshotID: description: Specify the ID of the snapshot. Get the ID using the "List Snapshots" API. type: string x-go-name: SnapshotID snapshotName: description: Specify the name of the snapshot. Get the name using "List Snapshots" API. type: string x-go-name: SnapshotName x-go-name: TriggerArgs x-go-package: git.druva.org/foundation/jobmgmt/haydn/spec/enterpriseworkload/restore/base JobAzureSQL: description: Job parameters. type: object properties: actualErrorCode: description: Actual error code for failed jobs. type: string x-go-name: ActualErrorCode attemptNo: description: Job retry attempt number. type: integer format: int64 x-go-name: AttemptNo createdTS: description: Timestamp in seconds when job is created. type: integer format: int64 x-go-name: CreatedTS endedTS: description: Timestamp in seconds when job is ended. type: integer format: int64 x-go-name: EndedTS entityID: description: The ID of the backup set. type: integer format: int64 x-go-name: EntityID entityName: description: The name of the backup set. type: string x-go-name: EntityName entityType: description: The type of the backup set. type: string x-go-name: EntityType errorCategory: description: Category of error for failed jobs. type: string x-go-name: ErrorCategory errorCode: description: Error code for failed jobs. type: integer format: int64 x-go-name: ErrorCode errorDetails: $ref: '#/components/schemas/JSONMap' errorMsg: description: Error message for failed jobs. type: string x-go-name: ErrorMsg extendedParams: description: Additional parameters required for job execution. type: object additionalProperties: type: object x-go-name: ExtendedParams globalCustomerID: description: Unique global customer ID. type: string x-go-name: GlobalCustomerID jobConfig: $ref: '#/components/schemas/JSONMap' jobID: description: A unique identification number associated with the job. type: integer format: int64 x-go-name: JobID jobType: description: Type of the job. type: string x-go-name: JobType percent: description: Percentage of job completed. type: integer format: int64 x-go-name: Percent primaryAuthEntityID: description: Primary authorization entity ID. The value is ID of your organization. type: string x-go-name: PrimaryAuthEntityID primaryAuthEntityType: description: Type of primary authorization entity ID. The value is "org". type: string x-go-name: PrimaryAuthEntityType productCustomerID: description: Customer ID specific to the product. type: integer format: int64 x-go-name: ProductCustomerID productID: description: Phoenix product ID. The value is 12289. type: integer format: int32 x-go-name: ProductID requestParams: $ref: '#/components/schemas/JSONMap' resourceID: description: The unique identifier of the Azure SQL resource. type: integer format: int64 x-go-name: ResourceID resourceName: description: The name of the Azure SQL resource. type: string x-go-name: ResourceName resourceType: description: 'The type of resource. The value corresponds to the entity type ID: 13 for Azure SQL Database Server, 15 for Azure SQL Managed Instance, and 17 for Azure SQL server on Azure VM.' type: string x-go-name: ResourceType retryCount: description: Numbers of retries attempted. type: integer format: int64 x-go-name: RetryCount retryEnabled: description: Indicates if retry is enabled. The value is "true" if retry is enabled. type: boolean x-go-name: RetryEnabled retryWaitinterval: description: Retry interval in minutes before next retry attempt. type: integer format: int64 x-go-name: RetryWaitinterval scheduleEventID: description: Schedule event ID for scheduled jobs. type: string x-go-name: ScheduleEventID scheduleID: description: Schedule ID for scheduled jobs. type: string x-go-name: ScheduleID secondaryAuthEntityID: description: Secondary authorization entity ID. The value is ID of your group. type: string x-go-name: SecondaryAuthEntityID secondaryAuthEntityType: description: Type of secondary authorization entity ID. The value is "group". type: string x-go-name: SecondaryAuthEntityType startedTS: description: Job start timestamp in seconds. type: integer format: int64 x-go-name: StartedTS state: description: Current state of the job. type: string x-go-name: State stateID: description: ID of the current state of the job. type: integer format: int32 x-go-name: StateID stateLabel: description: Label of current state of the job. type: string x-go-name: StateLabel targetID: description: Target entity ID for restore operations. type: integer format: int64 x-go-name: TargetID targetName: description: Target VM name for restore operations. type: string x-go-name: TargetName targetType: description: Target entity type for restore operations. type: string x-go-name: TargetType updatedTS: description: Last updated timestamp in seconds. type: integer format: int64 x-go-name: UpdatedTS windowEndTS: description: Duration in seconds for which the backup job runs. type: integer format: int64 x-go-name: WindowEndTS workloadName: description: Name of the workload. The value is "azuresql". type: string x-go-name: WorkloadName x-go-package: git.druva.org/foundation/jobmgmt/job/spec CreateBackupTriggerArgsAzureSQL: description: CreateBackupTriggerArgs bundles all job creation params in single data type. type: object required: - backupsetID properties: backupsetID: description: Specify the ID of the backup set. Get the ID using the 'List backup sets' API. type: integer format: int64 x-go-name: BackupsetID x-go-name: TriggerArgs x-go-package: git.druva.org/foundation/jobmgmt/haydn/spec/enterpriseworkload/backup/base JSONMap: description: Returns the data for the current job. type: object additionalProperties: type: object x-go-package: phoenix/pkg/dlutil securitySchemes: Bearer: type: apiKey name: Authorization in: header OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: https://apis.druva.com/token scopes: read: Grants read access x-explorer-enabled: true