GetAvailableParserTypes - List supported parser types for a file
Lists all supported parser types for the specified file type (extension).
Usage notes
- Before a RAM user (subaccount) can call this operation, the user must first obtain Alibaba Cloud Model Studio API permissions (
AliyunBailianDataFullAccessorAliyunBailianDataReadOnlyAccess, both of which include the sfm:GetAvailableParserTypes permission) and join a workspace. An Alibaba Cloud account (primary account) can call this operation directly without authorization. We recommend that you call this operation by using the latest Alibaba Cloud Model Studio SDK. - This operation is idempotent.
Throttling: This operation is rate-limited if called too frequently. Do not exceed 10 calls per second. If a request is throttled, retry later.
Try it out
You can run this operation directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API operation. You can use the information in the Action element of a RAM policy statement to grant a RAM user or RAM role the permission to call this operation. For more information, see:
-
Action: a specific permission.
-
Access level: the access level of each action. Valid values: Write, Read, and List.
-
Resource type: the resource types that the action supports for authorization:
- Required resource types are marked with an asterisk (*) that precedes them.
- For actions that do not support resource-level authorization,
All resourcesis used.
-
Condition key: a condition key defined by the cloud service itself.
-
Dependent action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions before the operation can succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| sfm:GetAvailableParserTypes | get | *All resources * |
| None |
Request syntax
GET /{WorkspaceId}/datacenter/parser/parsertype HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The ID of the workspace to which the file belongs. For information about how to obtain the ID, see Use workspaces. | llm-3shx2gu255oqxxxx |
| FileType | string | Yes | The file type (extension) used to retrieve the parsers that support the file type. Valid values:
|
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | The request ID. | 17204B98-7734-4F9A-8464-2446XXXXXXX |
| Data | object | The business data returned when the request succeeds. | |
| FileType | string | The file type, which is the same as the FileType input parameter. | |
| ParserList | array<object> | The list of parsers that support the file type. | |
| ParserList | object | The parser object. | |
| DisplayName | string | The display name of the parsing method. | Intelligent document parsing |
| Parser | string | The parser code. Valid values:
| DOCMIND |
| Status | string | The status code returned by the operation. | 200 |
| Success | boolean | Indicates whether the operation call succeeded. Valid values:
| true |
| Message | string | The error message. | User not authorized to operate on the specified resource |
| Code | string | The returned error code. | DataCenter.Throttling |
Examples
Sample success response
JSON format
{
"RequestId": "17204B98-7734-4F9A-8464-2446XXXXXXX",
"Data": {
"FileType": "pdf",
"ParserList": [
{
"DisplayName": "智能文档解析",
"Parser": "DOCMIND"
}
]
},
"Status": 200,
"Success": true,
"Message": "User not authorized to operate on the specified resource",
"Code": "DataCenter.Throttling"
}
Error codes
For more error codes, see Error Center.