Method: corpora.documents.patch

Updates a Document.

HTTP request

PATCH https://generativelanguage.googleapis.com/v1beta/{document.name=corpora/*/documents/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
document.name

string

Immutable. Identifier. The Document resource name. The ID (name excluding the "corpora/*/documents/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from displayName along with a 12 character random suffix. Example: corpora/{corpus_id}/documents/my-awesome-doc-123a456b789c

Query parameters

Parameters
updateMask

string (FieldMask format)

Required. The list of fields to update. Currently, this only supports updating displayName and customMetadata.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of Document.

Response body

If successful, the response body contains an instance of Document.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/generative-language.retriever

For more information, see the Authentication Overview.