# Graph

- [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Graph#SCHEMA_REPRESENTATION)
- [Edge](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Graph#Edge)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Graph#Edge.SCHEMA_REPRESENTATION)

Graph is a resource that contains information about relations between nodes.

| JSON representation |
|---|
| ``` { "rootNodeId": string, "timeRange": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`) }, "nodes": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Node`) } ], "edges": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Graph#Edge`) } ] } ``` |

| Fields ||
|---|---|
| `rootNodeId` | `string` Required. The root node id of a graph. |
| `timeRange` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`)`` Required. The time range of the graph. |
| `nodes[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Node`)`` Optional. A list of nodes in the graph. |
| `edges[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Graph#Edge`)`` Optional. A list of edges connecting the root node to the explored nodes. |

## Edge

An edge between two nodes.

| JSON representation |
|---|
| ``` { "sourceNodeId": string, "targetNodeId": string, "labels": [ string ] } ``` |

| Fields ||
|---|---|
| `sourceNodeId` | `string` Required. The node that the exploration starts from. |
| `targetNodeId` | `string` Required. The node that was reached by the exploration. |
| `labels[]` | `string` Optional. A list of labels representing relationships between nodes. |