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. Subsequent multipart uploads and file merging will use this event flag ID (uploadId). 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 Supplementary 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, returns an empty string for uploadId.

Request Example

curl 'https://openapi.guance.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"
} 

Feedback

Is this page helpful? ×