Skip to main content

GetFileContentLength

MiaoRead calculates the word count for a document.

Debug

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

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 in the operation. Details are as follows:
    • For required resource types, an asterisk (*) is added before them.
    • 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: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
aimiaobi:GetFileContentLengthget
*All Resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
WorkspaceIdstringYes

The unique identifier of an Alibaba Cloud Model Studio workspace: Get the workspace ID (Workspace ID)

llm-2setzb9x4ewsd
DocNamestringNo

Document name

test.pdf
FileUrlstringNo

File URL

https://xxx/test.pdf

Response elements

NameTypeDescriptionExample value
object

Schema of Response

RequestIdstring

Unique request identifier

DD656AF9-0839-521A-A3D2-F320009F9C87
Codestring

Status code

successful
Dataobject

Business data

WordNumlong

File length

1024
HttpStatusCodeinteger

HTTP status code

200
Messagestring

Response message.

success
Successboolean

Whether the operation succeeded: true means success, false means failure

True

Examples

Normal response example JSON format
{
  "RequestId": "DD656AF9-0839-521A-A3D2-F320009F9C87",
  "Code": "successful",
  "Data": {
    "WordNum": 1024
  },
  "HttpStatusCode": 200,
  "Message": "success",
  "Success": true
}

Error codes

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