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 resourcesis 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.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:UploadBook | create | *All resources * |
| None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Unique identifier of the Alibaba Cloud Model Studio workspace: Get workspaceId | llm-ipe7d81yq4sl5jmk |
| Docs | array<object> | Yes | Documents | |
| object | Yes | Document | ||
| DocName | string | No | Document name | Document1.pdf |
| FileUrl | string | No | File URL | http://xxx/ccc.pdf |
| CategoryId | string | No | Folder ID | default |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 3f7045e099474ba28ceca1b4eb6d6e21 |
| Code | string | Status code | successful |
| Data | object | Business data | |
| DocIds | array | Document IDs | |
| docIds | string | Document ID | aaaxxx |
| ExistedIds | array | IDs of erroneous documents | |
| existedIds | string | Document ID | ccccc |
| HttpStatusCode | integer | HTTP status code | 200 |
| Message | string | Error message | success |
| Success | boolean | Whether the operation is successful: true indicates success, false indicates failure | true |
Examples
Success response
JSON format
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Check the workspaceId value |