# REST Resource: projects.locations.dataStores.sessions.answers

- [Resource: Answer](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.dataStores.sessions.answers#Answer)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.dataStores.sessions.answers#Answer.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.dataStores.sessions.answers#METHODS_SUMMARY)

## Resource: Answer

Defines an answer.

| JSON representation |
|---|
| ``` { "name": string, "state": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.State`), "answerText": string, "citations": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.Citation`) } ], "groundingSupports": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.GroundingSupport`) } ], "references": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.Reference`) } ], "relatedQuestions": [ string ], "steps": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.Step`) } ], "queryUnderstandingInfo": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.QueryUnderstandingInfo`) }, "answerSkippedReasons": [ enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.AnswerSkippedReason`) ], "createTime": string, "completeTime": string, "safetyRatings": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.SafetyRating`) } ], "groundingScore": number } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` |
| `state` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.State`)`` The State of the answer generation. |
| `answerText` | `string` The textual answer. |
| `citations[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.Citation`)`` Citations. |
| `groundingSupports[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.GroundingSupport`)`` Optional. Grounding supports. |
| `references[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.Reference`)`` References. |
| `relatedQuestions[]` | `string` Suggested related questions. |
| `steps[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.Step`)`` Answer generation steps. |
| `queryUnderstandingInfo` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.QueryUnderstandingInfo`)`` Query understanding information. |
| `answerSkippedReasons[]` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.AnswerSkippedReason`)`` Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Answer creation timestamp. 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"`. |
| `completeTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Answer completed timestamp. 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"`. |
| `safetyRatings[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.sessions.answers#Answer.SafetyRating`)`` Optional. Safety ratings. |
| `groundingScore` | `number` A score in the range of \[0, 1\] describing how grounded the answer is by the reference chunks. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.dataStores.sessions.answers/get` | Gets a Answer. |