Skip to main content

GetFilterDocumentList

This operation retrieves a list of documents. You can filter documents by metadata or use paging.

Operation description

Prerequisites You have activated Alibaba Cloud Model Studio and Tongyi Dianjin. To obtain the workspace ID, see the document about obtaining the workspace ID.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:
  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.
  • API: The API that you can call to perform the action.
  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.
  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.
    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.
    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.
  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.
  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dianjin:GetFilterDocumentList

none

*All Resource

*

NoneNone

Request syntax

POST /{workspaceId}/api/library/filterDocument HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspaceId

string

Yes

Workspace ID.

llm-xxxxx

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

Request body.

and

array<object>

No

AND expression to filter documents or document chunks.

object

No

A set of constraints in triplet format, joined by AND.

boost

number

No

Weight of the value in the text retrieval engine. Default is 1.

1

key

string

No

Metadata key in the document library.

company

operator

string

No

Relationship between the stored metadata value and your input value

  • eq: The stored metadata value equals your input value.

  • contains: The stored metadata value list contains your input value.

eq

value

string

No

Input metadata value.

alibaba

docIdList

array

No

List of document IDs to filter documents or document chunks.

string

No

Document ID.

3553835752369972270

libraryId

string

Yes

Document library ID to filter documents or document chunks.

cjshcxxxx

or

array<object>

No

OR expression to filter documents or document chunks.

object

No

A set of constraints in triplet format, joined by OR.

boost

number

No

Weight of the value in the text retrieval engine. Default is 1.

1

key

string

No

Metadata key in the document library.

company

operator

string

No

Relationship between the stored metadata value and your input value

  • eq: The stored metadata value equals your input value.

  • contains: The stored metadata value list contains your input value.

contains

value

string

No

Input metadata value.

alibaba

page

integer

No

Page number for pagination.

1

pageSize

integer

No

Number of records per page for pagination.

10

status

array

No

List of document statuses to filter documents.

Document parsing status codes

Status codes: WaitRefresh, InQueue, FetchingData, Embedding, Completed, FormatError, Error

  • Completed: Active. Document parsing completed.

  • Error: Inactive. Document parsing failed.

  • FormatError: File format error. Re-upload the file in the correct format if it is encrypted or incomplete.

  • InQueue: Pending. Document is waiting for parsing.

  • Parsed: Parsing completed.

  • Other statuses are internal system states. For example, WaitRefresh means the task is scheduled. FetchingData means parsing is in progress. Embedding means index building is in progress.

Valid values:

  • InQueue :

    InQueue

  • WaitRefresh :

    WaitRefresh

  • FetchingData :

    FetchingData

  • Completed :

    Completed

  • Error :

    Error

  • Embedding :

    Embedding

string

No

Document status to filter documents.

Completed

Response elements

Element

Type

Description

Example

object

Response data.

cost

integer

Time spent on the request, in milliseconds.

null

data

object

Response data.

currentPage

integer

Current page number.

1

pageSize

integer

Number of records per page.

10

records

array<object>

Records.

array<object>

Data.

docId

string

Document ID.

29368126816

documentMeta

object

Document metadata.

{"a": "1"}

fileType

string

File type.

pdf

gmtCreate

string

Creation time.

2024-01-01 00:00:00

gmtModified

string

Modification time.

2024-01-01 00:00:00

libraryId

string

Document library ID.

sdfgsjdfg

statusCode

string

Document status. Valid values: WaitRefresh (waiting for refresh), InQueue (pending), FetchingData (retrieving data), Embedding (processing document), Error (failed), Completed (active), Null (unknown).

WaitRefresh

title

string

Document title.

Company document

url

string

Document URL.

null

totalPages

integer

Total number of pages.

10

totalRecords

integer

Total number of records.

100

dataType

string

Data type.

null

errCode

string

Error code.

0

message

string

Error message.

ok

requestId

string

Request ID.

7ADF010C-FD89-569D-A079-2D4D5247E943

success

boolean

Indicates whether the request succeeded.

true

time

string

Timestamp.

2024-01-01 00:00:00

Examples

Success response JSON format
{
  "cost": 0,
  "data": {
    "currentPage": 1,
    "pageSize": 10,
    "records": [
      {
        "docId": "29368126816",
        "documentMeta": {
          "a": "1"
        },
        "fileType": "pdf",
        "gmtCreate": "2024-01-01 00:00:00",
        "gmtModified": "2024-01-01 00:00:00",
        "libraryId": "sdfgsjdfg",
        "statusCode": "WaitRefresh",
        "title": "公司文档",
        "url": "null"
      }
    ],
    "totalPages": 10,
    "totalRecords": 100
  },
  "dataType": "null",
  "errCode": "0",
  "message": "ok",
  "requestId": "7ADF010C-FD89-569D-A079-2D4D5247E943",
  "success": true,
  "time": "2024-01-01 00:00:00"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.
Token Plan
Model Playground
Fine-tuning
Model Compression
Statistics and Monitoring
Support