# Variable VectorApi`Const`

VectorApi: {
_defaultBasePath: string;
createCollection: (
body: CollectionRequest,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<any>;
createDocuments: (
collectionId: string,
body: DocumentCreateRequest,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<DocumentsListResponse>;
deleteAllDocuments: (
body: DocumentBulkDeleteRequest,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<DocumentBulkDeleteResponse>;
deleteCollectionById: (
collectionId: string,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<any>;
deleteDocumentById: (
collectionId: string,
documentId: string,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<any>;
getAllCollections: (
queryParameters: { $count?: boolean; $skip?: number; $top?: number },
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<CollectionsListResponse>;
getAllDocuments: (
collectionId: string,
queryParameters: { $count?: boolean; $skip?: number; $top?: number },
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<Documents>;
getCollectionById: (
collectionId: string,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<Collection>;
getCollectionCreationStatus: (
id: string,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<
CollectionCreatedResponse
| CollectionPendingResponse,
>;
getCollectionDeletionStatus: (
id: string,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<
CollectionPendingResponse
| CollectionDeletedResponse,
>;
getDocumentById: (
collectionId: string,
documentId: string,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<DocumentResponse>;
search: (
body: TextSearchRequest,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<VectorSearchResults>;
updateChunksMetadata: (
body: MetadataUpdates,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<MetadataResponse>;
updateCollectionsMetadata: (
body: MetadataUpdates,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<MetadataResponse>;
updateDocuments: (
collectionId: string,
body: DocumentUpdateRequest,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<DocumentsListResponse>;
updateDocumentsMetadata: (
body: MetadataUpdates,
headerParameters: { "AI-Resource-Group": string },
) => OpenApiRequestBuilder<MetadataResponse>;
}

Representation of the 'VectorApi'. This API is part of the 'api' service.

#### Type Declaration

- ##### _defaultBasePath: string

- ##### createCollection: (
  body: CollectionRequest,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<any>

  Creates a collection. This operation is asynchronous. Poll the collection resource and check the status field to understand creation status.

- ##### createDocuments: (
  collectionId: string,
  body: DocumentCreateRequest,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<DocumentsListResponse>

  Create and stores one or multiple documents into a collection. If omitted, 'id' will be auto-generated.

- ##### deleteAllDocuments: (
  body: DocumentBulkDeleteRequest,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<DocumentBulkDeleteResponse>

  Deletes list of documents across collections.

- ##### deleteCollectionById: (
  collectionId: string,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<any>

  Deletes a specific collection by ID. This operation is asynchronous. Poll the collection for a 404 status code.

- ##### deleteDocumentById: (
  collectionId: string,
  documentId: string,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<any>

  Deletes a specific document of a collection.

- ##### getAllCollections: (
  queryParameters: { $count?: boolean; $skip?: number; $top?: number },
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<CollectionsListResponse>

  Gets a list of collections.

- ##### getAllDocuments: (
  collectionId: string,
  queryParameters: { $count?: boolean; $skip?: number; $top?: number },
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<Documents>

  Gets a list of documents of a collection.

- ##### getCollectionById: (
  collectionId: string,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<Collection>

  Gets a specific collection by ID.

- ##### getCollectionCreationStatus: (
  id: string,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<
  CollectionCreatedResponse
  | CollectionPendingResponse,
  >

  Gets a specific collection status from monitor by ID.

- ##### getCollectionDeletionStatus: (
  id: string,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<
  CollectionPendingResponse
  | CollectionDeletedResponse,
  >

  Gets a specific collection status from monitor by ID.

- ##### getDocumentById: (
  collectionId: string,
  documentId: string,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<DocumentResponse>

  Gets a specific document in a collection by ID.

- ##### search: (
  body: TextSearchRequest,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<VectorSearchResults>

  Search chunks

- ##### updateChunksMetadata: (
  body: MetadataUpdates,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<MetadataResponse>

  Allows to add, remove and modify the chunks metadata.

- ##### updateCollectionsMetadata: (
  body: MetadataUpdates,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<MetadataResponse>

  Allows to add, remove and modify the collections metadata.

- ##### updateDocuments: (
  collectionId: string,
  body: DocumentUpdateRequest,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<DocumentsListResponse>

  Upserts the data of multiple documents into a collection.

- ##### updateDocumentsMetadata: (
  body: MetadataUpdates,
  headerParameters: { "AI-Resource-Group": string },
  ) => OpenApiRequestBuilder<MetadataResponse>

  Allows to add, remove and modify the documents metadata.

  Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.

- Defined in packages/document-grounding/dist/client/api/vector-api.d.ts:7