Skip to main content

UploadDoc - Upload a document

Uploads a document to Miaodu.

Usage notes

Document upload is asynchronous. After calling this operation, poll getDocInfo to check the document status. Only when the status is 1 can you perform subsequent operations such as summarization, generating a mind map for the full text, summarizing questions and answers, extracting keywords, or rewriting.

Try it out

You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples. Try it out

Authorization information

The following table describes the authorization information for this API operation. You can use this information in the Action element of a RAM policy statement to grant a RAM user or RAM role permission to call the operation. The columns are described as follows:
  • Action: a specific permission.
  • Access level: the access level of an action. Valid values: Write, Read, and List.
  • Resource type: the types of resources for which the action supports authorization:
    • Required resource types are marked with an asterisk (*).
    • Actions that do not support resource-level authorization use All resources.
  • Condition key: a condition key defined by the cloud service.
  • Dependent action: an additional permission required to perform the action. The caller must also have permission to perform the dependent action.
ActionAccess levelResource typeCondition keyDependent action
aimiaobi:UploadDoccreate*All resources*NoneNone

Request parameters

NameTypeRequiredDescriptionExample
WorkspaceIdstringYesThe unique ID of the Alibaba Cloud Model Studio workspace. For more information, see Workspace IDllm-yigtrrjl377rcbab
Docsarray<object>YesThe document.
objectYesThe document.
DocNamestringYesThe document name.document1.pdf
FileUrlstringYesThe file URL.http://xxx/ccc.pdf
CategoryIdstringNoThe directory that contains the document. Default: default.default

Response parameters

NameTypeDescriptionExample
objectSchema of Response
CodestringThe internal error code.successful
DataobjectThe document information.
DocIdsarrayThe IDs of documents that were uploaded successfully.
docIdsstringThe document ID.aaaxxx
ExistedIdsarrayThe IDs of documents that could not be uploaded because they already exist.
existedIdsstringThe document ID.ccccc
HttpStatusCodeintegerThe HTTP status code.200
MessagestringThe error description.success
RequestIdstringId of the request1813ceee-7fe5-41b4-87e5-982a4d18cca5
SuccessbooleanIndicates whether the request succeeded.true

Examples

Sample success response JSON format
{
  "Code": "successful",
  "Data": {
    "DocIds": [
      "aaaxxx"
    ],
    "ExistedIds": [
      "ccccc"
    ]
  },
  "HttpStatusCode": 200,
  "Message": "success",
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Success": true
}

Error codes

HTTP status codeThe error code.The error message.Description
403NoPermissionYou are not authorized to perform this action.Check the value of workspaceId.
For more error codes, see Error Center.
Agent Development
Agent Context
Agent Governance & Evolution
Store
Application Marketplace
    • Quanmiao product migration recommendations
        • API overview
        • Endpoints
        • RAM authorization
        • Release notes