Initialization of Sharded Upload¶
POST /api/v1/rum_sourcemap/multipart_upload_init
Overview¶
The first step in the operation of uploading a sourcemap compressed file (sharded upload). This initializes a sharded upload event. Subsequent sharded uploads and file merging will use the event ID (uploadId). For more details, refer to: SourceMap Sharded Upload Associated Interface Usage Instructions
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
needCover | boolean | Whether to forcibly overwrite an existing file. Default is false, i.e., no overwrite Can be empty: False |
|
appId | string | Y | appId Can be empty: False |
version | string | Version Can be empty: False Can be an empty string: True |
|
env | string | Environment Can be empty: False Can be an empty string: True |
Additional Parameter Notes¶
Note 1: Under the same application, only one sourcemap with the same version
and env
can exist. You can overwrite an existing sourcemap using the needCover
parameter.
If you do not overwrite, the uploadId
returned will be an empty string.
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"
}