Skip to content

Multipart Upload Initialization



POST /api/v1/rum_sourcemap/multipart_upload_init

Overview

The first step in the sourcemap compressed file upload (multipart upload) operation. Initializes a multipart upload event. The event identifier ID (uploadId) will be used in subsequent multipart uploads and file merging. For details, refer to: SourceMap Multipart Upload Related Interface Usage Instructions

Body Request Parameters

Parameter Name Type Required Description
needCover boolean Whether to forcibly overwrite existing files. Default is false, meaning do not overwrite.
Allow empty: False
appId string Y appId
Allow empty: False
version string Version
Allow empty: False
Allow empty string: True
env string Environment
Allow empty: False
Allow empty string: True

Parameter Additional Notes

Note 1: Only one sourcemap with the same version and env can exist for the same application. You can use the needCover parameter to overwrite an existing sourcemap. If not overwritten, an empty string is returned for uploadId.

Request Example

curl 'https://openapi.truewatch.com/api/v1/rum_sourcemap/multipart_upload_init' \
-H 'Content-Type: application/json' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw $'{\n  "needCover": true,\n  "appId": "app_demo",\n "version": "1.0.2",\n "env": "daily"\n}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "declaration": {
            "b": [
                "asfawfgajfasfafgafwba",
                "asfgahjfaf"
            ],
            "business": "aaa",
            "organization": "6540c09e4243b300077a9675"
        },
        "existsOldTask": false,
        "existsSameFile": false,
        "uploadId": "65ef45944fac157005cb73de48e81f161Lfv5UOs"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-6985B262-8F52-4AA0-9CE4-9277CE199DC3"
}