Method: projects.locations.dataStores.branches.documents.create

Document を作成します。

HTTP リクエスト

POST https://discoveryengine.googleapis.com/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents

この URL では gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
parent

string

必須。親リソース名(projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch} など)。

クエリ パラメータ

パラメータ
documentId

string

必須。Document に使用する ID。これは Document.name の最終的なコンポーネントになります。

呼び出し元に Document を作成する権限がない場合、Document が存在するかどうかにかかわらず、PERMISSION_DENIED エラーが返されます。

このフィールドは、同じ parent を持つすべての Document の中で一意である必要があります。それ以外の場合は、ALREADY_EXISTS エラーが返されます。

このフィールドは RFC-1034 標準に準拠している必要があり、長さの上限は 128 文字です。それ以外の場合は、INVALID_ARGUMENT エラーが返されます。

リクエストの本文

リクエストの本文には Document のインスタンスが含まれます。

レスポンスの本文

成功した場合、レスポンスの本文には、新しく作成された Document のインスタンスが含まれます。

認可スコープ

次の OAuth スコープのいずれかが必要です。

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite

詳細については、Authentication Overview をご覧ください。

IAM 権限

parent リソースに対する次の IAM 権限が必要です。

  • discoveryengine.documents.create

詳細については、IAM のドキュメントをご覧ください。