Skip to main content

UploadBook

Use MiaoDu to upload books.

Try it now

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Try it now

RAM authorization

The following table describes the authorization information for this API. You can use it in the Action element of RAM policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
  • Action: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the operation. Details are as follows:
    • Required resource types are marked with a preceding asterisk (*).
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: other permissions required to successfully perform the operation. The operator must have the permissions of all dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
aimiaobi:UploadBookcreate
*All resources
*
    None
None

Request parameters

ParameterTypeRequiredDescriptionExample
WorkspaceIdstringYes

Unique identifier of the Alibaba Cloud Model Studio workspace: Get workspaceId

llm-ipe7d81yq4sl5jmk
Docsarray<object>Yes

Documents

objectYes

Document

DocNamestringNo

Document name

Document1.pdf
FileUrlstringNo

File URL

http://xxx/ccc.pdf
CategoryIdstringNo

Folder ID

default

Response elements

ElementTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

3f7045e099474ba28ceca1b4eb6d6e21
Codestring

Status code

successful
Dataobject

Business data

DocIdsarray

Document IDs

docIdsstring

Document ID

aaaxxx
ExistedIdsarray

IDs of erroneous documents

existedIdsstring

Document ID

ccccc
HttpStatusCodeinteger

HTTP status code

200
Messagestring

Error message

success
Successboolean

Whether the operation is successful: true indicates success, false indicates failure

true

Examples

Success response JSON format
{
  "RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
  "Code": "successful",
  "Data": {
    "DocIds": [
      "aaaxxx"
    ],
    "ExistedIds": [
      "ccccc"
    ]
  },
  "HttpStatusCode": 200,
  "Message": "success",
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action.Check the workspaceId value
Visit the Error Center to view more error codes.