This topic describes the UploadFile API provided by OceanBase Migration Service (OMS) Community Edition.
Overview
You can call this operation to upload a file.
API details
Constraints
This API is applicable to OMS Community Edition V4.2.12-CE and later.
Request path
POST /api/v2?Action=UploadFile
Content-Type
Content-Type: multipart/form-data
Request parameters
| Parameter | Type | Description |
|---|---|---|
| file | file | The file to be uploaded. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the call was successful. |
| errorDetail | object | The details of the error. |
| code | string | The error code. |
| message | string | The description. |
| advice | string | The suggestion. |
| requestId | string | The request ID. |
| pageNumber | integer | The page number, which takes effect when you perform a paginated query. |
| pageSize | integer | The page size, which takes effect when you perform a paginated query. |
| totalCount | integer | The total number of items, which takes effect when you perform a paginated query. |
| cost | string | The request cost in seconds. |
| data | string | The ID of the uploaded file. |
Examples
Request example
file[binary]
Response example
{
"success": true,
"errorDetail": null,
"code": null,
"message": null,
"advice": null,
"requestId": "0892****",
"pageNumber": null,
"pageSize": null,
"totalCount": null,
"cost": "94 ms",
"data": "upload_****"
}