Imports an unstructured document stored in the temporary storage space to Data Management.
Operation description
- Before you call this operation, make sure that you have obtained the lease and uploaded the document to the temporary storage space by using the ApplyFileUploadLease operation. For more information, see Upload files by calling API.
- You must call this operation within 12 hours after you call the ApplyFileUploadLease operation. Otherwise, the lease expires and the request fails.
- After you call this operation, the system parses and imports your document. The process takes some time.
- This interface is not idempotent.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
sfm:AddFile | create | *All Resources * |
| none |
Request syntax
PUT /{WorkspaceId}/datacenter/file HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
LeaseId | string | Yes | The lease ID, which corresponds to the | 68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847 |
Parser | string | Yes | The parser. Valid value:
| DASHSCOPE_DOCMIND |
CategoryId | string | Yes | The primary key ID of the category to which the document is uploaded. This parameter corresponds to the | cate_cdd11b1b79a74e8bbd675c356a91ee3510024405 |
WorkspaceId | string | Yes | The ID of the workspace to which the document is uploaded. On the homepage of the console, click the workspace Details icon in the upper-left corner to view the workspace ID. | ws_3AXoiweeTyTd03IN |
Tags | array | No | A list of tags associated with the document. The default value is null, which means no tags. You can specify up to 10 tags. | |
string | No | The tag of the document. A tag can be up to 12 characters in length and can contain letters, digits, digits, underscores (_), and hyphens (-). | Product Introduction |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "DataCenter.FileTooLarge",
"Data": {
"FileId": "file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX",
"Parser": "DASHSCOPE_DOCMIND"
},
"Message": "User not authorized to operate on the specified resource.",
"RequestId": "778C0B3B-xxxx-5FC1-A947-36EDD13606AB",
"Status": "200",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.