REST Resource: documents

リソース: Document

Document は、デベロッパー ナレッジ コーパスのコンテンツを表します。

JSON 表現
{
  "name": string,
  "uri": string,
  "content": string,
  "description": string,
  "dataSource": string,
  "title": string,
  "updateTime": string,
  "view": enum (DocumentView),
  "contentLengthBytes": integer
}
フィールド
name

string

ID。ドキュメントのリソース名が含まれます。形式: documents/{uri_without_scheme} 例: documents/docs.cloud.google.com/storage/docs/creating-buckets

uri

string

出力専用。docs.cloud.google.com/storage/docs/creating-buckets などのコンテンツの URI を提供します。

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 を指定します。

contentLengthBytes

integer

出力専用。content フィールドの長さ(バイト単位)。

DocumentView

Document のどのフィールドを含めるかを指定します。

列挙型
DOCUMENT_VIEW_UNSPECIFIED デフォルト値 / 未設定の値。DocumentView が指定されていない場合は、各 API メソッドのデフォルト値をご覧ください。
DOCUMENT_VIEW_BASIC

基本的なメタデータ フィールドのみが含まれます。

  • name
  • uri
  • dataSource
  • title
  • description
  • updateTime
  • view
  • contentLengthBytes

これは、DeveloperKnowledge.SearchDocumentChunks のビューのデフォルトです。

DOCUMENT_VIEW_FULL すべての Document フィールドが含まれます。
DOCUMENT_VIEW_CONTENT

DOCUMENT_VIEW_BASIC フィールドと content フィールドが含まれます。

これは、DeveloperKnowledge.GetDocumentDeveloperKnowledge.BatchGetDocuments のビューのデフォルトです。

メソッド

batchGet

複数のドキュメントを取得します。各ドキュメントには完全な Markdown コンテンツが含まれます。

get

完全な Markdown コンテンツを含む 1 つのドキュメントを取得します。

searchDocumentChunks

Google のデベロッパー向けドキュメント全体でデベロッパー ナレッジを検索します。