diff --git a/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java
index 3ebebbc31..4647e2be3 100644
--- a/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java
+++ b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/client/VectorApi.java
@@ -4,6 +4,8 @@
import com.sap.ai.sdk.grounding.model.Collection;
import com.sap.ai.sdk.grounding.model.CollectionRequest;
import com.sap.ai.sdk.grounding.model.CollectionsListResponse;
+import com.sap.ai.sdk.grounding.model.DocumentBulkDeleteRequest;
+import com.sap.ai.sdk.grounding.model.DocumentBulkDeleteResponse;
import com.sap.ai.sdk.grounding.model.DocumentCreateRequest;
import com.sap.ai.sdk.grounding.model.DocumentResponse;
import com.sap.ai.sdk.grounding.model.DocumentUpdateRequest;
@@ -217,6 +219,77 @@ public DocumentsListResponse createDocuments(
localVarReturnType);
}
+ /**
+ * Delete list of documents across collections
+ *
+ *
Deletes list of documents across collections.
+ *
+ *
200 - Successful Response
+ *
+ *
400 - The specification of the resource was incorrect
+ *
+ *
404 - The specification of the resource was incorrect
+ *
+ *
422 - There are validation issues with the data.
+ *
+ * @param aiResourceGroup Resource Group ID
+ * @param documentBulkDeleteRequest The value for the parameter documentBulkDeleteRequest
+ * @return DocumentBulkDeleteResponse
+ * @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull
+ public DocumentBulkDeleteResponse deleteAllDocuments(
+ @Nonnull final String aiResourceGroup,
+ @Nonnull final DocumentBulkDeleteRequest documentBulkDeleteRequest)
+ throws OpenApiRequestException {
+ final Object localVarPostBody = documentBulkDeleteRequest;
+
+ // verify the required parameter 'aiResourceGroup' is set
+ if (aiResourceGroup == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'aiResourceGroup' when calling deleteAllDocuments");
+ }
+
+ // verify the required parameter 'documentBulkDeleteRequest' is set
+ if (documentBulkDeleteRequest == null) {
+ throw new OpenApiRequestException(
+ "Missing the required parameter 'documentBulkDeleteRequest' when calling vectorV1VectorEndpointsDeleteAllDocuments");
+ }
+
+ final String localVarPath =
+ UriComponentsBuilder.fromPath("/vector/documents").build().toUriString();
+
+ final MultiValueMap localVarQueryParams =
+ new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams =
+ new LinkedMultiValueMap();
+
+ if (aiResourceGroup != null)
+ localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));
+
+ final String[] localVarAccepts = {"application/json"};
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {"application/json"};
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] {};
+
+ final ParameterizedTypeReference localVarReturnType =
+ new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ HttpMethod.DELETE,
+ localVarQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType);
+ }
+
/**
* Delete collection by ID
*
diff --git a/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java
index 78de8426b..b514ab2d4 100644
--- a/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java
+++ b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/CollectionRequest.java
@@ -22,6 +22,7 @@
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
+import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -39,6 +40,9 @@ public class CollectionRequest
@JsonProperty("metadata")
private List metadata = new ArrayList<>();
+ @JsonProperty("id")
+ private UUID id;
+
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
@@ -156,6 +160,37 @@ public void setMetadata(@Nullable final List metadata) {
this.metadata = metadata;
}
+ /**
+ * Set the id of this {@link CollectionRequest} instance and return the same instance.
+ *
+ * @param id Unique identifier of a collection.
+ * @return The same instance of this {@link CollectionRequest} class
+ */
+ @Nonnull
+ public CollectionRequest id(@Nullable final UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique identifier of a collection.
+ *
+ * @return id The id of this {@link CollectionRequest} instance.
+ */
+ @Nonnull
+ public UUID getId() {
+ return id;
+ }
+
+ /**
+ * Set the id of this {@link CollectionRequest} instance.
+ *
+ * @param id Unique identifier of a collection.
+ */
+ public void setId(@Nullable final UUID id) {
+ this.id = id;
+ }
+
/**
* Get the names of the unrecognizable properties of the {@link CollectionRequest}.
*
@@ -197,6 +232,7 @@ public Map toMap() {
if (title != null) declaredFields.put("title", title);
if (embeddingConfig != null) declaredFields.put("embeddingConfig", embeddingConfig);
if (metadata != null) declaredFields.put("metadata", metadata);
+ if (id != null) declaredFields.put("id", id);
return declaredFields;
}
@@ -224,12 +260,13 @@ public boolean equals(@Nullable final java.lang.Object o) {
return Objects.equals(this.cloudSdkCustomFields, collectionRequest.cloudSdkCustomFields)
&& Objects.equals(this.title, collectionRequest.title)
&& Objects.equals(this.embeddingConfig, collectionRequest.embeddingConfig)
- && Objects.equals(this.metadata, collectionRequest.metadata);
+ && Objects.equals(this.metadata, collectionRequest.metadata)
+ && Objects.equals(this.id, collectionRequest.id);
}
@Override
public int hashCode() {
- return Objects.hash(title, embeddingConfig, metadata, cloudSdkCustomFields);
+ return Objects.hash(title, embeddingConfig, metadata, id, cloudSdkCustomFields);
}
@Override
@@ -240,6 +277,7 @@ public String toString() {
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" embeddingConfig: ").append(toIndentedString(embeddingConfig)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
cloudSdkCustomFields.forEach(
(k, v) ->
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
diff --git a/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DocumentBulkDeleteRequest.java b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DocumentBulkDeleteRequest.java
new file mode 100644
index 000000000..5a7ec0f29
--- /dev/null
+++ b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DocumentBulkDeleteRequest.java
@@ -0,0 +1,214 @@
+/*
+ * Grounding
+ * Grounding is a service designed to handle data-related tasks, such as grounding and retrieval, using vector databases. It provides specialized data retrieval through these databases, grounding the retrieval process with your own external and context-relevant data. Grounding combines generative AI capabilities with the ability to use real-time, precise data to improve decision-making and business operations for specific AI-driven business solutions.
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import java.util.UUID;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** A request to delete documents by their IDs. */
+// CHECKSTYLE:OFF
+public class DocumentBulkDeleteRequest
+// CHECKSTYLE:ON
+{
+ @JsonProperty("ids")
+ private List ids = new ArrayList<>();
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for DocumentBulkDeleteRequest. */
+ protected DocumentBulkDeleteRequest() {}
+
+ /**
+ * Set the ids of this {@link DocumentBulkDeleteRequest} instance and return the same instance.
+ *
+ * @param ids List of document IDs to delete
+ * @return The same instance of this {@link DocumentBulkDeleteRequest} class
+ */
+ @Nonnull
+ public DocumentBulkDeleteRequest ids(@Nonnull final List ids) {
+ this.ids = ids;
+ return this;
+ }
+
+ /**
+ * Add one ids instance to this {@link DocumentBulkDeleteRequest}.
+ *
+ * @param idsItem The ids that should be added
+ * @return The same instance of type {@link DocumentBulkDeleteRequest}
+ */
+ @Nonnull
+ public DocumentBulkDeleteRequest addIdsItem(@Nonnull final UUID idsItem) {
+ if (this.ids == null) {
+ this.ids = new ArrayList<>();
+ }
+ this.ids.add(idsItem);
+ return this;
+ }
+
+ /**
+ * List of document IDs to delete
+ *
+ * @return ids The ids of this {@link DocumentBulkDeleteRequest} instance.
+ */
+ @Nonnull
+ public List getIds() {
+ return ids;
+ }
+
+ /**
+ * Set the ids of this {@link DocumentBulkDeleteRequest} instance.
+ *
+ * @param ids List of document IDs to delete
+ */
+ public void setIds(@Nonnull final List ids) {
+ this.ids = ids;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link DocumentBulkDeleteRequest}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link DocumentBulkDeleteRequest} instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException(
+ "DocumentBulkDeleteRequest has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link DocumentBulkDeleteRequest} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (ids != null) declaredFields.put("ids", ids);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link DocumentBulkDeleteRequest} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final DocumentBulkDeleteRequest documentBulkDeleteRequest = (DocumentBulkDeleteRequest) o;
+ return Objects.equals(this.cloudSdkCustomFields, documentBulkDeleteRequest.cloudSdkCustomFields)
+ && Objects.equals(this.ids, documentBulkDeleteRequest.ids);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(ids, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class DocumentBulkDeleteRequest {\n");
+ sb.append(" ids: ").append(toIndentedString(ids)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link
+ * DocumentBulkDeleteRequest} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (ids) -> new DocumentBulkDeleteRequest().ids(ids);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the ids of this {@link DocumentBulkDeleteRequest} instance.
+ *
+ * @param ids List of document IDs to delete
+ * @return The DocumentBulkDeleteRequest instance.
+ */
+ DocumentBulkDeleteRequest ids(@Nonnull final List ids);
+
+ /**
+ * Set the ids of this {@link DocumentBulkDeleteRequest} instance.
+ *
+ * @param ids List of document IDs to delete
+ * @return The DocumentBulkDeleteRequest instance.
+ */
+ default DocumentBulkDeleteRequest ids(@Nonnull final UUID... ids) {
+ return ids(Arrays.asList(ids));
+ }
+ }
+}
diff --git a/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DocumentBulkDeleteResponse.java b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DocumentBulkDeleteResponse.java
new file mode 100644
index 000000000..6d4d03859
--- /dev/null
+++ b/core-services/document-grounding/src/main/java/com/sap/ai/sdk/grounding/model/DocumentBulkDeleteResponse.java
@@ -0,0 +1,292 @@
+/*
+ * Grounding
+ * Grounding is a service designed to handle data-related tasks, such as grounding and retrieval, using vector databases. It provides specialized data retrieval through these databases, grounding the retrieval process with your own external and context-relevant data. Grounding combines generative AI capabilities with the ability to use real-time, precise data to improve decision-making and business operations for specific AI-driven business solutions.
+ *
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.ai.sdk.grounding.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import java.util.UUID;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** Response after deleting documents in bulk. */
+// CHECKSTYLE:OFF
+public class DocumentBulkDeleteResponse
+// CHECKSTYLE:ON
+{
+ @JsonProperty("deleted")
+ private List deleted = new ArrayList<>();
+
+ @JsonProperty("notFound")
+ private List notFound = new ArrayList<>();
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for DocumentBulkDeleteResponse. */
+ protected DocumentBulkDeleteResponse() {}
+
+ /**
+ * Set the deleted of this {@link DocumentBulkDeleteResponse} instance and return the same
+ * instance.
+ *
+ * @param deleted List of successfully deleted document IDs
+ * @return The same instance of this {@link DocumentBulkDeleteResponse} class
+ */
+ @Nonnull
+ public DocumentBulkDeleteResponse deleted(@Nonnull final List deleted) {
+ this.deleted = deleted;
+ return this;
+ }
+
+ /**
+ * Add one deleted instance to this {@link DocumentBulkDeleteResponse}.
+ *
+ * @param deletedItem The deleted that should be added
+ * @return The same instance of type {@link DocumentBulkDeleteResponse}
+ */
+ @Nonnull
+ public DocumentBulkDeleteResponse addDeletedItem(@Nonnull final UUID deletedItem) {
+ if (this.deleted == null) {
+ this.deleted = new ArrayList<>();
+ }
+ this.deleted.add(deletedItem);
+ return this;
+ }
+
+ /**
+ * List of successfully deleted document IDs
+ *
+ * @return deleted The deleted of this {@link DocumentBulkDeleteResponse} instance.
+ */
+ @Nonnull
+ public List getDeleted() {
+ return deleted;
+ }
+
+ /**
+ * Set the deleted of this {@link DocumentBulkDeleteResponse} instance.
+ *
+ * @param deleted List of successfully deleted document IDs
+ */
+ public void setDeleted(@Nonnull final List deleted) {
+ this.deleted = deleted;
+ }
+
+ /**
+ * Set the notFound of this {@link DocumentBulkDeleteResponse} instance and return the same
+ * instance.
+ *
+ * @param notFound List of document IDs that were not found
+ * @return The same instance of this {@link DocumentBulkDeleteResponse} class
+ */
+ @Nonnull
+ public DocumentBulkDeleteResponse notFound(@Nonnull final List notFound) {
+ this.notFound = notFound;
+ return this;
+ }
+
+ /**
+ * Add one notFound instance to this {@link DocumentBulkDeleteResponse}.
+ *
+ * @param notFoundItem The notFound that should be added
+ * @return The same instance of type {@link DocumentBulkDeleteResponse}
+ */
+ @Nonnull
+ public DocumentBulkDeleteResponse addNotFoundItem(@Nonnull final UUID notFoundItem) {
+ if (this.notFound == null) {
+ this.notFound = new ArrayList<>();
+ }
+ this.notFound.add(notFoundItem);
+ return this;
+ }
+
+ /**
+ * List of document IDs that were not found
+ *
+ * @return notFound The notFound of this {@link DocumentBulkDeleteResponse} instance.
+ */
+ @Nonnull
+ public List getNotFound() {
+ return notFound;
+ }
+
+ /**
+ * Set the notFound of this {@link DocumentBulkDeleteResponse} instance.
+ *
+ * @param notFound List of document IDs that were not found
+ */
+ public void setNotFound(@Nonnull final List notFound) {
+ this.notFound = notFound;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link DocumentBulkDeleteResponse}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link DocumentBulkDeleteResponse}
+ * instance.
+ *
+ * @deprecated Use {@link #toMap()} instead.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ @Deprecated
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if (!cloudSdkCustomFields.containsKey(name)) {
+ throw new NoSuchElementException(
+ "DocumentBulkDeleteResponse has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link DocumentBulkDeleteResponse} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (deleted != null) declaredFields.put("deleted", deleted);
+ if (notFound != null) declaredFields.put("notFound", notFound);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link DocumentBulkDeleteResponse} instance. If the map
+ * previously contained a mapping for the key, the old value is replaced by the specified value.
+ *
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final DocumentBulkDeleteResponse documentBulkDeleteResponse = (DocumentBulkDeleteResponse) o;
+ return Objects.equals(
+ this.cloudSdkCustomFields, documentBulkDeleteResponse.cloudSdkCustomFields)
+ && Objects.equals(this.deleted, documentBulkDeleteResponse.deleted)
+ && Objects.equals(this.notFound, documentBulkDeleteResponse.notFound);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(deleted, notFound, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class DocumentBulkDeleteResponse {\n");
+ sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n");
+ sb.append(" notFound: ").append(toIndentedString(notFound)).append("\n");
+ cloudSdkCustomFields.forEach(
+ (k, v) ->
+ sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link
+ * DocumentBulkDeleteResponse} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (deleted) ->
+ (notFound) -> new DocumentBulkDeleteResponse().deleted(deleted).notFound(notFound);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the deleted of this {@link DocumentBulkDeleteResponse} instance.
+ *
+ * @param deleted List of successfully deleted document IDs
+ * @return The DocumentBulkDeleteResponse builder.
+ */
+ Builder1 deleted(@Nonnull final List deleted);
+
+ /**
+ * Set the deleted of this {@link DocumentBulkDeleteResponse} instance.
+ *
+ * @param deleted List of successfully deleted document IDs
+ * @return The DocumentBulkDeleteResponse builder.
+ */
+ default Builder1 deleted(@Nonnull final UUID... deleted) {
+ return deleted(Arrays.asList(deleted));
+ }
+ }
+
+ /** Builder helper class. */
+ public interface Builder1 {
+ /**
+ * Set the notFound of this {@link DocumentBulkDeleteResponse} instance.
+ *
+ * @param notFound List of document IDs that were not found
+ * @return The DocumentBulkDeleteResponse instance.
+ */
+ DocumentBulkDeleteResponse notFound(@Nonnull final List notFound);
+
+ /**
+ * Set the notFound of this {@link DocumentBulkDeleteResponse} instance.
+ *
+ * @param notFound List of document IDs that were not found
+ * @return The DocumentBulkDeleteResponse instance.
+ */
+ default DocumentBulkDeleteResponse notFound(@Nonnull final UUID... notFound) {
+ return notFound(Arrays.asList(notFound));
+ }
+ }
+}
diff --git a/core-services/document-grounding/src/main/resources/spec/grounding.yaml b/core-services/document-grounding/src/main/resources/spec/grounding.yaml
index 3e731e882..0b2ff6bc9 100644
--- a/core-services/document-grounding/src/main/resources/spec/grounding.yaml
+++ b/core-services/document-grounding/src/main/resources/spec/grounding.yaml
@@ -944,6 +944,40 @@ paths:
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
+ "/vector/documents":
+ delete:
+ tags:
+ - Vector
+ summary: Delete list of documents across collections
+ description: Deletes list of documents across collections.
+ operationId: vector.v1.vector_endpoints.delete_all_documents
+ x-sap-cloud-sdk-operation-name: deleteAllDocuments
+ parameters:
+ - in: header
+ name: AI-Resource-Group
+ required: true
+ schema:
+ type: string
+ description: Resource Group ID
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DocumentBulkDeleteRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DocumentBulkDeleteResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '422':
+ $ref: '#/components/responses/UnprocessableEntity'
"/retrieval/dataRepositories":
get:
parameters:
@@ -2283,6 +2317,11 @@ components:
Metadata attached to collection. Useful to restrict search to a
subset of collections.
default: []
+ id:
+ type: string
+ format: uuid
+ title: Id
+ description: Unique identifier of a collection.
type: object
required:
- embeddingConfig
@@ -2966,6 +3005,44 @@ components:
- msg
- type
title: ValidationError
+ DocumentBulkDeleteRequest:
+ properties:
+ ids:
+ type: array
+ items:
+ type: string
+ format: uuid
+ minItems: 1
+ maxItems: 100
+ title: Ids
+ description: List of document IDs to delete
+ type: object
+ required:
+ - ids
+ title: DocumentBulkDeleteRequest
+ description: A request to delete documents by their IDs.
+ DocumentBulkDeleteResponse:
+ properties:
+ deleted:
+ type: array
+ items:
+ type: string
+ format: uuid
+ title: Deleted
+ description: List of successfully deleted document IDs
+ notFound:
+ type: array
+ items:
+ type: string
+ format: uuid
+ title: NotFound
+ description: List of document IDs that were not found
+ type: object
+ required:
+ - deleted
+ - notFound
+ title: DocumentBulkDeleteResponse
+ description: Response after deleting documents in bulk.
### ### ######################## ### ###
### ### ### Error ### ### ###