Skip to content

Delete



POST /api/v1/rum_sourcemap/delete

Overview

Manually delete the SourceMap files for the specified application, environment, and version.

Prerequisites and Usage Steps

The current Key requires rum.rumCfgManage. Only the Workspace to which the current Key belongs is supported. Take appId from content[].appId in the RUM Application Quick List; it must be consistent with app_id in the SDK/error records and cannot be replaced by the database internal UUID. SourceMap is precisely located by application, environment env, and version version; case/whitespace is part of the identifier itself and must exactly match the collection records. Omitting env/version or using an empty string means an empty environment/empty version, not a wildcard for all. The current managed lifecycle requires each to be at most 256 characters.

Irrecoverable file deletion operation: first confirm that the version has been disabled and retain the build source artifacts. Only the exact env/version is deleted, not the entire application/all environments, and RUM applications/client Tokens or historical error records are not deleted; previous error records may no longer be able to restore source code again. When the current target does not exist and there is no unfinished upload of the same version, true may be returned with no deletion audit; when there is a pending upload/reader/cleanup conflict, 409 is returned, and the lock cannot be bypassed. Normally, cleanup is marked and ownership is acquired first, then files are deleted/the index is updated/the record is completed; on failure, files may already be deleted while the index/state has not converged and compensation is started. The list hides records that are being deleted; the disappearance from the list alone cannot prove that physical reclamation is complete. HTTP 200/content=true indicates that this request is complete and does not provide the number of deleted files; for network failures/500, first check the list, file tree errors, and traceId together, and do not blindly repeat deletion or rebuild the same version. Manual deletion is not protected by the latest-copy retention count; the original build files must be retained by the customer.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the Workspace.
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 Type Required Description
appId string Y Required identifier of an active application in the current Workspace; this is not the internal RumCfg UUID and cannot be used across Workspaces.
Null allowed: False
Example: payment_web
How to obtain or enter: Obtain from content[].appId in the RUM Application Quick List or from app_id in error records.
version string Optional string. Defaults to an empty version, up to 256 characters; does not mean the latest/all versions. Null is not allowed.
Null allowed: False
Empty string allowed: True
Example: 1.2.3
How to obtain or enter: Obtain from the actual version released by the client or version in error records, corresponding to the build artifact.
env string Optional string. Defaults to an empty environment, up to 256 characters; does not mean all environments. Null is not allowed.
Null allowed: False
Empty string allowed: True
Example: production
How to obtain or enter: Obtain from the client release environment or env in error records; it must be exactly the same as at upload time.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/rum_sourcemap/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"appId":"payment_web","env":"production","version":"1.2.3"}'

Response

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

Field Type Description
content boolean Always true; may also be true when the target has no match; no file count.
content.reasonCode string Error responses only: machine-readable reason, for example active_operation/invalid_scope/registry_missing.
content.action string Error responses only: suggested action, for example retry_after_operation/verify_ownership/check_scope_and_upload.
content.retryable boolean Error responses only: server-suggested retryable flag; do not replay an already published write based solely on this.
content.actualBytes integer Partial capacity errors only: number of bytes counted.
content.maxBytes integer Capacity/read limit in bytes.
content.workspaceUUID string Restricted diagnostics for some errors: current Workspace UUID.
content.appId string Restricted diagnostics for some errors: public application identifier.
content.rumCfgUUID string Restricted diagnostics for some errors: internal application identifier, used only for support troubleshooting and does not replace the request appId.
content.env string Diagnostics for some errors: environment.
content.version string Diagnostics for some errors: version.
content.bundleUUID string Diagnostics for some errors: record ID for this generation, not uploadId.
content.state string Diagnostics for some errors: generation state.
content.resource string Contention diagnostics for some errors: resource type, such as application/bundle.
content.shared boolean Contention diagnostics for some errors: whether access is shared.
content.waitedSeconds number Contention diagnostics for some errors: number of seconds waited.
content.waitSeconds number Contention diagnostics for some errors: allowed wait in seconds.
content.waitExhausted boolean Contention diagnostics for some errors: whether this wait was exhausted.
content.elapsedSeconds number Diagnostics for some single-file errors: operation duration in seconds.
content.phase string Diagnostics for some errors: failure phase.
content.phaseElapsedSeconds number Diagnostics for some errors: phase duration in seconds.
{
  "code": 200,
  "content": true,
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

Storage lifecycle compatibility error codes are retained: 409 is usually still ft.InvalidAction; the localized message and content.reasonCode further distinguish the cause; do not treat message names such as SourceMapOperationBusy as the inevitable errorCode. Reading a missing package/in-progress/unavailable package is often 404 ft.SourceMapPackageNotFound; see reasonCode for the specific cause. Retry with backoff only when retryable=true is explicitly returned and the current state allows it; when uploadCommitted=true, do not replay writes that have already been confirmed as published.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed Request field is missing, or the 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 The top level of the JSON is not an object Some json files have a format error Submit an object.
404 ft.NotFoundRumSet The application is not in the current Workspace, has been deleted, or does not exist The specified RUM setting was not found Refresh the RUM Application Quick List and use the actual appId in the current Workspace.
409 ft.InvalidAction Upload/read/cleanup conflict, legacy directory takeover not completed, ownership/recovery pending verification, or environment/version outside the allowed lifecycle range A specific localized prompt is returned based on reasonCode, for example, the 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, and do not delete the lock 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 release 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, without .., 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; a failure may already have published files or processing markers, so do not blindly overwrite/delete again.

Feedback

Is this page helpful?