Retrieve the content of a file.
Try it now
You can run this API directly in OpenAPI Explorer without calculating signatures. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information of the API. You can use the Action element in RAM permission 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, and 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 caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| quanmiaolightapp:GetFileContent | get | *All Resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| fileKey | string | No | FileKey of the file (unique identifier of the file in the Miaobi service) | oss://default/aimiaobi-service-prod/aimiaobi/temp/1154600634854327_10045847/300469535473178749_300469535473178749_ee11508152b74137ac5747a6f632256e.docx |
| workspaceId | string | Yes | Alibaba Cloud Model Studio workspace ID | llm-xxxx |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | Id of the request | BE603C85-90AA-50FC-A2D6-128AA9FA200D |
| success | string | Whether the request is successful: true for success, false for failure. | true |
| data | object | Result object | |
| content | string | Content | xxxx |
| httpStatusCode | integer | HTTP status code | 200 |
| message | string | Error description | successful |
| code | string | Response code | successful |
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 , Please check the assignment of the workspaceId. | Check the workspaceId assignment. |