# REST Resource: projects.locations.collections.dataObjects

## Resource: DataObject

A dataObject resource in Vector Search.

| JSON representation |
|---|
| ``` { "name": string, "dataObjectId": string, "createTime": string, "updateTime": string, "data": { object }, "vectors": { string: { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects#Vector`) }, ... }, "etag": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The fully qualified resource name of the dataObject. Format: `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObjectId}` The dataObjectId must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). |
| `dataObjectId` | `string` Output only. The id of the dataObject. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp the dataObject was created at. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp the dataObject was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `data` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. The data of the dataObject. |
| `vectors` | ``map (key: string, value: object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects#Vector`))`` Optional. The vectors of the dataObject. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `etag` | `string` Optional. The etag of the dataObject. |

## Vector

A vector which can be either dense or sparse.

| JSON representation |
|---|
| ``` { "values": [ number ], // Union field `vector_type` can be only one of the following: "dense": { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects#DenseVector`) }, "sparse": { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects#SparseVector`) } // End of list of possible types for union field `vector_type`. } ``` |

| Fields ||
|---|---|
| `values[] (deprecated)` | `number` > [!WARNING] > This item is deprecated! Deprecated: Use `dense` or `sparse` instead. |
| Union field `vector_type`. The type of the vector. `vector_type` can be only one of the following: ||
| `dense` | ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects#DenseVector`)`` A dense vector. |
| `sparse` | ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects#SparseVector`)`` A sparse vector. |

## DenseVector

A dense vector.

| JSON representation |
|---|
| ``` { "values": [ number ] } ``` |

| Fields ||
|---|---|
| `values[]` | `number` Required. The values of the vector. |

## SparseVector

A sparse vector.

| JSON representation |
|---|
| ``` { "values": [ number ], "indices": [ integer ] } ``` |

| Fields ||
|---|---|
| `values[]` | `number` Required. The values of the vector. |
| `indices[]` | `integer` Required. The corresponding indices for the values. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/aggregate` | Aggregates data objects. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/batchCreate` | Creates a batch of dataObjects. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/batchDelete` | Deletes dataObjects in a batch. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/batchSearch` | Batch searches data objects. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/batchUpdate` | Updates dataObjects in a batch. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/create` | Creates a dataObject. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/delete` | Deletes a dataObject. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/get` | Gets a data object. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/patch` | Updates a dataObject. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/query` | Queries data objects. |
| ### `https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1beta/projects.locations.collections.dataObjects/search` | Searches data objects. |