Multipart Upload Initialization¶
POST /api/v1/rum_sourcemap/multipart_upload_init
Overview¶
The first step in the multipart upload operation for sourcemap compressed files. Initializes a multipart upload event. The event ID (uploadId) will be used for subsequent multipart uploads and file merging. For details, refer to: SourceMap Multipart Upload Related Interface Usage Instructions
Body Request Parameters¶
Parameter | Type | Required | Description |
---|---|---|---|
needCover | boolean | Whether to forcibly overwrite existing files, defaults to false, i.e., do not overwrite Allowed to be empty: False |
|
appId | string | Y | appId Allowed to be empty: False |
version | string | Version Allowed to be empty: False Allowed to be empty string: True |
|
env | string | Environment Allowed to be empty: False Allowed to be 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, the returned uploadId
will be an empty string.
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"
}