REST Resource: documents

資源:Document

Document 代表開發人員知識主體中的一段內容。

JSON 表示法
{
  "name": string,
  "uri": string,
  "content": string,
  "description": string,
  "dataSource": string,
  "title": string,
  "updateTime": string,
  "view": enum (DocumentView)
}
欄位
name

string

ID。包含文件的資源名稱。格式:documents/{uri_without_scheme} 範例:documents/docs.cloud.google.com/storage/docs/creating-buckets

uri

string

僅供輸出。提供內容的 URI,例如 docs.cloud.google.com/storage/docs/creating-buckets

content

string

僅供輸出。包含 Markdown 格式的文件完整內容。

description

string

僅供輸出。提供文件說明。

dataSource

string

僅供輸出。指定文件的資料來源。資料來源範例:firebase.google.com

title

string

僅供輸出。提供文件標題。

updateTime

string (Timestamp format)

僅供輸出。代表文件內容或中繼資料上次更新的時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

view

enum (DocumentView)

僅供輸出。指定文件的 DocumentView

DocumentView

指定要納入 Document 的哪些欄位。

列舉
DOCUMENT_VIEW_UNSPECIFIED 預設 / 未設定值。如未指定 DocumentView,請參閱各個 API 方法的預設值。
DOCUMENT_VIEW_BASIC

僅包含基本中繼資料欄位:- name - uri - dataSource - title - description - updateTime - view

這是 DeveloperKnowledge.SearchDocumentChunks 的預設檢視畫面。

DOCUMENT_VIEW_FULL 包含所有 Document 欄位。
DOCUMENT_VIEW_CONTENT

包括 DOCUMENT_VIEW_BASIC 欄位和 content 欄位。

這是 DeveloperKnowledge.GetDocumentDeveloperKnowledge.BatchGetDocuments 的預設檢視畫面。

方法

batchGet

擷取多份文件,每份文件都包含完整的 Markdown 內容。

get

擷取單一文件及其完整 Markdown 內容。

searchDocumentChunks

在 Google 的開發人員說明文件中搜尋開發人員知識。