Method: corpora.documents.delete

Deletes a Document.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the Document to delete. Example: corpora/my-corpus-123/documents/the-doc-abc

Query parameters

Parameters
force

boolean

Optional. If set to true, any Chunks and objects related to this Document will also be deleted.

If false (the default), a FAILED_PRECONDITION error will be returned if Document contains any Chunks.

Request body

The request body must be empty.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.