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

브랜치에서 선택한 모든 Document를 완전히 삭제합니다.

이 프로세스는 비동기식입니다. 삭제할 Document 수에 따라 이 작업을 완료하는 데 몇 시간이 걸릴 수 있습니다. 삭제 작업이 완료되기 전에는 일부 DocumentDocumentService.GetDocument 또는 DocumentService.ListDocuments에 의해 반환될 수 있습니다.

삭제할 Document 목록을 가져오려면 PurgeDocumentsRequest.force을 false로 설정합니다.

HTTP 요청

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

URL은 gRPC 트랜스코딩 문법을 사용합니다.

경로 매개변수

매개변수
parent

string

필수 항목입니다. 상위 리소스 이름입니다(예: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}).

요청 본문

요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.

JSON 표현
{
  "filter": string,
  "errorConfig": {
    object (PurgeErrorConfig)
  },
  "force": boolean,

  // Union field source can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  },
  "inlineSource": {
    object (InlineSource)
  }
  // End of list of possible types for union field source.
}
필드
filter

string

필수 항목입니다. 일치하는 문서를 필터링하여 삭제합니다. 현재 지원되는 값은 * (모든 항목)뿐입니다.

errorConfig

object (PurgeErrorConfig)

삭제 중에 발생하는 오류의 원하는 위치입니다.

force

boolean

실제로 삭제를 실행합니다. force가 false로 설정되면 문서를 삭제하지 않고 예상되는 삭제 횟수를 반환합니다.

통합 필드 source. 문서 ID를 기반으로 문서를 삭제하는 데 필요한 입력 소스입니다. source은 다음 중 하나여야 합니다.
gcsSource

object (GcsSource)

입력 콘텐츠의 Cloud Storage 위치입니다. 지원되는 dataSchema: * documentId: 줄당 하나의 유효한 Document.id

inlineSource

object (InlineSource)

삭제를 위한 입력 콘텐츠의 인라인 소스입니다.

응답 본문

성공한 경우 응답 본문에 Operation의 인스턴스가 포함됩니다.

승인 범위

다음 OAuth 범위 중 하나가 필요합니다.

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

자세한 내용은 Authentication Overview를 참조하세요.

IAM 권한

parent 리소스에 대해서는 다음 IAM 권한이 필요합니다.

  • discoveryengine.documents.purge

자세한 내용은 IAM 문서를 참조하세요.