Skip to main content
Version: 1.0

ListDocuments

POST 

/v1/list-documents

Lists information about each document ingested into the corpus including the Document ID and metadata. This is useful for managing the lifecycle of documents and a quick way to check which documents are already in the index.

Some tips for this API:

  • This operation works with the Personal API Key and OAuth 2.0 (in a JWT "Bearer Token") authentication. You can find details of how to set up and use OAuth 2.0 here.

Request

Header Parameters

    customer-id integerrequired

    Enter the Customer ID to use for the request.

    timeout string

    Default value: 30S

    (Optional) Enter the timeout value of the request in seconds, such as 10S or 30S.

Body

required

Request to list documents in a corpus.

    corpusId int64

    The Corpus ID.

    numResults int64

    Maximum number of results to be returned by the server. Max is 1000. If the value is larger than 1000, it will be capped to 1000.

    pageKey byte

    Key of the specific page of the list results to return. Null/empty value means the very first page of the results is requested.

    metadataFilter string

    Filter on document metadata. If empty, no filtering is done. Otherwise, only documents that match all of the specified metadata will be returned. The syntax is the same as for QueryRequest.metadata.

Responses

A successful response.

Schema
    document object[]

    The list of documents.

  • Array [
  • id string

    The document ID that was used when indexing the document.

    metadata object[]

    Document metadata.

  • Array [
  • name string

    Name of the document metadata attribute.

    value string

    Value of the document metadata attribute.

  • ]
  • ]
  • nextPageKey byte

    Represents the pagination key to retrieve the next page of results. If the value is "", it means no further results for the request. To retrieve the next page of results, client shall pass the value of next_page_key in the subsequent ListDocumentsRequest method call (in the request message's page_key field).

Loading...