List File Tree¶
POST /api/v1/rum_sourcemap/file_tree
Overview¶
Lists the relative file and directory names for the specified SourceMap version.
Prerequisites and Usage Steps¶
The Key must match one of routine.defaultAccess or rum.rumCfgManage. Only the workspace to which the current Key belongs is supported. Obtain appId from content[].appId in the RUM application summary. It must match app_id in the SDK/error records and cannot be replaced by the internal database UUID. SourceMap is precisely located by application, environment env, and version version; case and whitespace are part of the identifier itself and must exactly match the ingestion records. Omitting env/version or using an empty string indicates an empty environment/version, not a wildcard for all. The current managed lifecycle requires each to be at most 256 characters.
The POST JSON locates the exact environment/version. It reads a protected local snapshot. ready/settling and some blocked versions that have historical time anomalies but are readable can be returned; other not-ready/missing-file cases are described by 404 and reasonCode. When a new upload is still processing, do not read it based on a previous successful merge.
Returns lexicographically sorted relative path strings, with directories ending in /; this is not a nested tree. It does not return file content, size, download URL, or MD5. Use it to verify whether the ZIP root directory hierarchy matches the stack URL path; [] only indicates that no entries are currently returned and cannot replace full parsing acceptance. Historical directory listing anomalies may also be tolerated as empty.
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. Active application identifier in the current workspace; it is not the internal RumCfg UUID and cannot be used across workspaces. Null allowed: False Example: payment_webHow to obtain or enter: Obtain from content[].appId in the RUM application summary or app_id in error records. |
| version | string | Optional string. Defaults to an empty version and is at most 256 characters. It does not represent the latest/all versions. Null is not allowed. Null allowed: False Empty string allowed: True Example: 1.2.3How to obtain or enter: Obtain from the version actually released by the client/version in error records; it corresponds to the build artifact. |
|
| env | string | Optional string. Defaults to an empty environment and is at most 256 characters. It does not represent all environments. Null is not allowed. Null allowed: False Empty string allowed: True Example: productionHow to obtain or enter: Obtain from the client release environment/env in error records; it must match verbatim what was used during upload. |
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/rum_sourcemap/file_tree' \
-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 | array<string> |
Lexicographically sorted list of relative paths; an empty result is []. |
| content[] | string | Relative path of a file or a directory ending in /. |
| content.reasonCode | string | Error responses only: machine-readable reason, such as active_operation/invalid_scope/registry_missing. |
| content.action | string | Error responses only: suggested action, such as retry_after_operation/verify_ownership/check_scope_and_upload. |
| content.retryable | boolean | Error responses only: server-suggested retryable flag; do not use it 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 | Limited diagnostics for some errors: current workspace UUID. |
| content.appId | string | Limited diagnostics for some errors: public application identifier. |
| content.rumCfgUUID | string | Limited diagnostics for some errors: internal application identifier, used only for support troubleshooting and not as a replacement for 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: ID of this generation record, not uploadId. |
| content.state | string | Diagnostics for some errors: generation state. |
| content.resource | string | Resource contention diagnostics for some cases: resource type, such as application/bundle. |
| content.shared | boolean | Resource contention diagnostics for some cases: whether access is shared. |
| content.waitedSeconds | number | Resource contention diagnostics for some cases: seconds waited. |
| content.waitSeconds | number | Resource contention diagnostics for some cases: allowed wait seconds. |
| content.waitExhausted | boolean | Resource contention diagnostics for some cases: 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": [
"static/",
"static/js/",
"static/js/app.js.map"
],
"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; the localized message and content.reasonCode further distinguish the cause. Do not treat message names such as SourceMapOperationBusy as necessarily being the errorCode. Missing package/processing/unavailable reads are usually 404 ft.SourceMapPackageNotFound; see reasonCode for the specific cause. Back off and retry only when retryable=true is explicitly returned and the current state allows it; when uploadCommitted=true, do not replay writes whose publication has been confirmed.
| HTTP Status | errorCode | Trigger | 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 | Verify the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | JSON top level is not an object | Some JSON file format errors | Submit an appId/env/version object. |
| 404 | ft.NotFoundRumSet | The application is not in the current workspace, has been deleted, or does not exist | Specified RUM setting not found | Refresh the RUM application summary and use the actual appId in the current workspace. |
| 404 | ft.SourceMapPackageNotFound | No record for the selected environment/version, still processing, unreadable, or required source files are missing | Returns localized prompts based on reasonCode, such as no record found/still processing/unreadable/source files do not exist | Verify the exact appId/env/version; for registry_missing, check whether an upload exists; for bundle_processing, wait; for bundle_unavailable/source_files_missing, check the status and files. Do not treat every 404 as no upload. |
| 409 | ft.InvalidAction | Upload/read/cleanup conflict, legacy directory takeover not completed, ownership/recovery pending verification, or environment/version outside the allowed lifecycle range | Returns specific localized prompts 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., first ask the administrator to verify, and do not delete occupancy records or force overwrite on your own. For invalid_scope, verify 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 the requirements or contains an unsupported link. Check the relative paths and directory structure of the uploaded files. | Use valid relative paths within the package, without .., backslashes, or absolute paths/symbolic links; check reasonCode=invalid_path. |
| 413 | ft.SourceMapSnapshotTooLarge | The size of the file snapshot required for reading exceeds the site limit, which defaults to 2 GiB | The total size of files required for this SourceMap read exceeds the limit | Reduce the number of files for this version or ask the administrator to check the limit; do not bypass the limit by repeatedly reading. |
| 500 | ft.InternalServerError | Database, file read/snapshot, historical configuration, or unhandled parsing exception | Internal error | Retain the traceId and application/env/version, confirm the version status and files first, and then handle the actual error; reads can be backed off and retried. |