---
updatedAt: 2025-12-08T07:26:55.000Z
agentTools:
  projectIndex: https://developer.druva.com/llms.txt
---

# On-demand backup

Initiates an on-demand backup for Azure SQL backupset.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Job Management for Cloud Workloads",
    "version": "1.0.0"
  },
  "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-explorer-enabled": true,
  "servers": [
    {
      "url": "//apis.druva.com/unity"
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "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"
      },
      "JSONMap": {
        "description": "Returns the data for the current job.",
        "type": "object",
        "additionalProperties": {
          "type": "object"
        },
        "x-go-package": "phoenix/pkg/dlutil"
      },
      "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"
      },
      "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"
      },
      "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"
      }
    }
  }
}
```