Skip to content

Cancel a Multipart Upload Event



POST /api/v1/rum_sourcemap/upload_cancel

Overview

Cancel a SourceMap multipart session that has not yet entered the merge and publish phase.

Before Calling and Usage Steps

This request uses the uploadId returned by initialization; appId, env, and version are already bound at initialization. Do not submit these scope fields additionally in this request.

The current Key requires rum.rumCfgManage. It is limited to the workspace to which the current Key belongs. For appId, use content[].appId from the RUM application quick list; it must match the app_id in the SDK/error records and cannot be replaced with the database internal UUID. SourceMap is located precisely by application, environment env, and version version; case/whitespace are part of the identifier itself and must be exactly consistent with the collection records. The appId/env/version of this request inherit the scope bound at initialization; no additional scope fields are accepted, and omitting these fields does not change the bound environment or version. The current managed lifecycle requires each to be at most 256 characters.

For the process, see SourceMap Multipart Upload Related API Usage Instructions and refer to Multipart Upload Operations Documentation. Perform initialization → upload all original ZIP parts → check the part list → merge → query version status and file tree in sequence. Successful initialization/merge does not mean the ZIP has been validated or can be parsed; statuses such as processing/failed/blocked require further verification.

Cancellation applies only to the upload generation associated with the uploadId. It does not delete previously published files for the same environment/version, nor does it withdraw published files. Unmerged sessions will be marked as failed uploads and temporary part cleanup will be scheduled; parts currently being written must exit naturally, and the directory may be reclaimed later. If a merge marker has already been generated, a 409 may be returned; do not use the cancel API to forcibly abort publishing.

true may still be returned when the cache does not exist, has expired, or no longer matches the current task; there is no hit count, and true cannot be used to conclude that the actual task has been canceled. Repeated old cancellations cannot clear the cache of newer sessions created later; after cancellation, first check the version list and part/file status, then decide whether to reinitialize. The response does not guarantee that all files/space have already been released.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y Workspace OpenAPI authentication credential.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace.

Body Request Parameters

Parameter Name Type Required Description
uploadId string Y Required upload session ID; do not concatenate it yourself or replace it with taskId. A Key with management permissions in the same workspace can continue; it is not isolated by the creating Key. The session defaults to 3600 seconds, and multipart uploads do not renew automatically; if it expires or is overwritten by a new session, verify and reinitialize.
Null allowed: False
Example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
How to obtain or enter: Save content.uploadId from the successful response of Initialize Multipart Upload as-is.

Additional Parameter Notes

For the process, see SourceMap Multipart Upload Related API Usage Instructions and refer to Multipart Upload Operations Documentation. Perform initialization → upload all original ZIP parts → check the part list → merge → query version status and file tree in sequence. Successful initialization/merge does not mean the ZIP has been validated or can be parsed; statuses such as processing/failed/blocked require further verification.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/rum_sourcemap/upload_cancel' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"uploadId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content boolean Fixed to true; it only indicates that this cancellation request has been processed and may not have an actual matching session.
content.reasonCode string Error response only: machine-readable reason, for example active_operation/invalid_scope/registry_missing.
content.action string Error response only: recommended action, for example retry_after_operation/verify_ownership/check_scope_and_upload.
content.retryable boolean Error response only: server-recommended retryable flag; it cannot be used alone to replay published writes.
content.actualBytes integer Some capacity errors only: number of bytes already counted.
content.maxBytes integer Capacity/read limit in bytes.
content.workspaceUUID string Some restricted error diagnostics: current workspace UUID.
content.appId string Some restricted error diagnostics: public application identifier.
content.rumCfgUUID string Some restricted error diagnostics: internal application identifier, used only for support troubleshooting and does not replace the request appId.
content.env string Some error diagnostics: environment.
content.version string Some error diagnostics: version.
content.bundleUUID string Some error diagnostics: record ID for this generation, not uploadId.
content.state string Some error diagnostics: generation state.
content.resource string Some occupancy diagnostics: resource type, such as application/bundle.
content.shared boolean Some occupancy diagnostics: whether access is shared.
content.waitedSeconds number Some occupancy diagnostics: seconds already waited.
content.waitSeconds number Some occupancy diagnostics: allowed wait seconds.
content.waitExhausted boolean Some occupancy diagnostics: wait exhausted this time.
content.elapsedSeconds number Some single-file error diagnostics: operation elapsed seconds.
content.phase string Some error diagnostics: failure phase.
content.phaseElapsedSeconds number Some error diagnostics: phase elapsed seconds.
{
  "code": 200,
  "content": true,
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

The storage lifecycle retains compatible error codes: 409 is usually still ft.InvalidAction, and the localized message and content.reasonCode further distinguish the cause. Do not treat message names such as SourceMapOperationBusy as necessarily being the errorCode. Reads for a missing package, processing, or unavailable status often return 404 ft.SourceMapPackageNotFound; see reasonCode for the specific cause. Retry with backoff only when retryable=true is explicitly returned and the current state permits it; when uploadCommitted=true, do not replay writes that have been confirmed as published.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError JSON top level is not an object Some json file format error Submit an uploadId object.
404 ft.NotFoundRumSet The application is not in the current workspace, has been deleted, or does not exist Specified RUM settings not found Refresh the RUM application quick list and use a real appId in the current workspace.
406 ft.InvalidUploadId When the cache still matches, the associated generation no longer allows cancellation/has been replaced, or the old session conflicts with the managed application state; when the cache has no match at all, true may be returned Invalid UploadId value, or the task has been overwritten Check the original uploadId and uploaded parts; after confirming the old session and publish status, reinitialize. Do not overwrite blindly.
409 ft.InvalidAction Upload/read/cleanup conflict, old directory takeover not completed, ownership/recovery pending verification, or environment version outside the lifecycle allowed range Return a specific localized prompt based on reasonCode, for example, SourceMap is being used by another upload, read, or cleanup operation Read content.reasonCode/action/retryable: for active_operation/active_upload, etc., back off as instructed; for owner_recovery_required/ownership_verification_required/legacy_invalid, etc., ask the administrator to verify first. Do not delete the occupying record or forcibly overwrite it yourself. For invalid_scope, check that env/version are at most 256 characters.
406 ft.InvalidFileName The file relative path, symbolic link, or historical publish path is unsafe The SourceMap file path does not meet requirements or contains an unsupported link. Check the relative path and directory structure of the uploaded file. Use a valid relative path within the package that does not contain .., backslashes, absolute paths/symbolic links; check reasonCode=invalid_path.
500 ft.InternalServerError Database, Redis, storage read/write, queue, or unhandled system exception Internal error Retain traceId, application/env/version/uploadId, and check the list/file tree first; the failure may already have published files or processing markers. Do not blindly overwrite/delete again.

Feedback

Is this page helpful?