You can call the DescribeJob operation to query the details and execution status of a specified batch operation job.
Permissions
An Alibaba Cloud account has all permissions by default. Resource Access Management (RAM) users and RAM roles do not have any permissions by default. The Alibaba Cloud account or an administrator must grant permissions using a RAM policy or a bucket policy.
API | Action | Description |
DescribeJob |
| Queries the details of a batch operation job. |
Request syntax
GET /?batchJob&batchJobId=xxx HTTP/1.1
Host: oss-cn-hangzhou.aliyuncs.com
Authorization: SignatureValueRequest parameters
Name | Type | Required | Example | Description |
batchJobId | String | Yes | MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU= | The ID of the batch operation job. The ID is 44 characters in length and contains letters and digits. It does not contain hyphens (-) or underscores (_). Child node: None Parent node: None |
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Response elements
Name | Type | Example | Description |
DescribeJobResult | Container | None | The root node of the response. Child node: Job Parent node: None |
Job | Container | None | The container for job details. Child nodes: ConfirmationRequired, CreationTime, FailureReasons, JobId, Operation, Report, Manifest, Description, Priority, RoleArn, StatusUpdateReason, KeyPrefixManifestGenerator, ProgressSummary, Status, and TerminationDate Parent node: DescribeJobResult |
ConfirmationRequired | Boolean | false | Indicates whether the job requires confirmation before it runs. Child node: None Parent node: Job |
CreationTime | Timestamp | 1749983400 | The time when the job was created. Child node: None Parent node: Job |
FailureReasons | Container | None | The reason why the job failed. This node is returned even if the job is successful. In this case, the JobFailure child node is empty. An error in a single operation does not cause the job to fail. Child node: JobFailure Parent node: Job |
JobFailure | Container | None | The details about the job failure. Child nodes: FailureCode and FailureReason Parent node: FailureReasons |
FailureCode | String | InternalError | The error code. Child node: None Parent node: JobFailure |
FailureReason | String | Internal service error | The error message. Child node: None Parent node: JobFailure |
JobId | String | MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU= | The job ID that OSS generates for the job. Child node: None Parent node: Job |
Operation | Container | None | The details about the operation to perform. Child node: RestoreObject Parent node: Job |
RestoreObject | Container | None | The details about the operation to restore Archive objects. Child nodes: Days and Tier Parent node: Operation |
Days | Integer | 7 | The number of days that the restored object remains accessible. Child node: None Parent node: RestoreObject |
Tier | String | Standard | Restore Priority Child node: None Parent node: RestoreObject |
Report | Container | None | The report configuration. Child nodes: Bucket, Enabled, Prefix, and ReportScope Parent node: Job |
Bucket | String | report-bucket | The bucket where the report is stored. Child node: None Parent node: Report |
Enabled | Boolean | true | Indicates whether a report is generated. Child node: None Parent node: Report |
Prefix | String | reports/ | The prefix of the report. Child node: None Parent node: Report |
ReportScope | String | AllTasks | The scope of the report. Child node: None Parent node: Report |
Manifest | Container | None | The manifest information. You can specify either this parameter or KeyPrefixManifestGenerator. Child nodes: Location and Spec Parent node: Job |
Location | Container | None | The location of the manifest. The bucket that stores the manifest file must be in the same region as the batch operation job. Child nodes: Bucket, ETag, Object, and VersionId Parent node: Manifest |
Bucket | String | manifest-bucket | The bucket where the manifest file is stored. Child node: None Parent node: Location |
ETag | String | d41d8cd98f00b204e9800998ecf8427e | The ETag of the manifest file. Child node: None Parent node: Location |
Object | String | manifest.csv | The object that corresponds to the manifest file. Child node: None Parent node: Location |
VersionId | String | 3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo | The version ID of the object that corresponds to the manifest file. Child node: None Parent node: Location |
Spec | Container | None | The description of the manifest format. Child nodes: Fields and Format Parent node: Manifest |
Fields | String | Bucket,Key | The fields in the manifest. Child node: None Parent node: Spec |
Format | String | OSS_BatchOperations_CSV_20250611 | The format. This indicates that the output is from an inventory report. Child node: None Parent node: Spec |
Description | String | Batch restore archive objects job | The description of the job. Child node: None Parent node: Job |
Priority | Integer | 10 | The priority of the job. Child node: None Parent node: Job |
RoleArn | String | arn:acs:ram::uid:role/BatchOperationRole | IAM role Child node: None Parent node: Job |
StatusUpdateReason | String | Task completed successfully | The reason for the status update. Child node: None Parent node: Job |
KeyPrefixManifestGenerator | Container | None | The configuration for automatically generating a manifest. You can specify either this parameter or Manifest. Child nodes: SourceBucket and Prefix Parent node: Job |
SourceBucket | String | source-bucket | The source bucket. Child node: None Parent node: KeyPrefixManifestGenerator |
Prefix | String | data/ | The prefix. Child node: None Parent node: KeyPrefixManifestGenerator |
ProgressSummary | Container | None | The summary of the job progress. Child nodes: NumberOfTasksFailed, NumberOfTasksSucceeded, Timers, and TotalNumberOfTasks Parent node: Job |
NumberOfTasksFailed | Long | 0 | The number of tasks that failed. Child node: None Parent node: ProgressSummary |
NumberOfTasksSucceeded | Long | 1000 | The number of tasks that were successful. Child node: None Parent node: ProgressSummary |
Timers | Container | None | The information about the running time. Child node: ElapsedTimeInActiveSeconds Parent node: ProgressSummary |
ElapsedTimeInActiveSeconds | Long | 3600 | The time elapsed for the job, in seconds. Child node: None Parent node: Timers |
TotalNumberOfTasks | Long | 1000 | The total number of tasks. Child node: None Parent node: ProgressSummary |
Status | String | Complete | The current status of the job. Valid values:
Child node: None Parent node: Job |
TerminationDate | Timestamp | 1749987000 | The time when the job ended. Child node: None Parent node: Job |
Response headers
This operation uses only common response headers. For more information, see Common response headers.
Examples
Request example
GET /?batchJob&batchJobId=MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU= HTTP/1.1 Host: oss-cn-hangzhou.aliyuncs.com Authorization: SignatureValueResponse example
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <DescribeJobResult> <Job> <ConfirmationRequired>false</ConfirmationRequired> <CreationTime>1749983400</CreationTime> <JobId>MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU=</JobId> <Operation> <RestoreObject> <Days>7</Days> <Tier>Standard</Tier> </RestoreObject> </Operation> <Report> <Bucket>report-bucket</Bucket> <Enabled>true</Enabled> <Prefix>reports/</Prefix> <ReportScope>AllTasks</ReportScope> </Report> <Manifest> <Location> <ETag>d41d8cd98f00b204e9800998ecf8427e</ETag> <Bucket>manifest-bucket</Bucket> <Object>manifest.csv</Object> <VersionId>3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo</VersionId> </Location> <Spec> <Fields>Bucket,Key</Fields> <Format>OSS_BatchOperations_CSV_20250611</Format> </Spec> </Manifest> <Description>Batch restore archive objects job</Description> <Priority>10</Priority> <RoleArn>arn:acs:ram::uid:role/BatchOperationRole</RoleArn> <StatusUpdateReason>Task completed successfully</StatusUpdateReason> <ProgressSummary> <NumberOfTasksFailed>0</NumberOfTasksFailed> <NumberOfTasksSucceeded>1000</NumberOfTasksSucceeded> <Timers> <ElapsedTimeInActiveSeconds>3600</ElapsedTimeInActiveSeconds> </Timers> <TotalNumberOfTasks>1000</TotalNumberOfTasks> </ProgressSummary> <Status>Complete</Status> <TerminationDate>1749987000</TerminationDate> </Job> </DescribeJobResult>