- [HTTP request](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.SearchLineageStreamingResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#body.aspect_1)
- [RootCriteria](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#RootCriteria)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#RootCriteria.SCHEMA_REPRESENTATION)
- [SearchDirection](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchDirection)
- [SearchFilters](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchFilters)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchFilters.SCHEMA_REPRESENTATION)
- [EntitySet](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#EntitySet)
- [Interval](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#Interval)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#Interval.SCHEMA_REPRESENTATION)
- [SearchLimits](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchLimits)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchLimits.SCHEMA_REPRESENTATION)
- [LineageLink](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageLink)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageLink.SCHEMA_REPRESENTATION)
- [LineageProcess](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageProcess)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageProcess.SCHEMA_REPRESENTATION)
- [DependencyInfo](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#DependencyInfo)
  - [JSON representation](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#DependencyInfo.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#try-it)

Retrieves a streaming response of lineage links connected to the requested assets by performing a breadth-first search in the given direction. Links represent the data flow between **source** (upstream) and **target** (downstream) assets in transformation pipelines. Links are stored in the same project as the Lineage Events that create them. This method retrieves links from all valid locations provided in the request. This method supports Column-Level Lineage (CLL) along with wildcard support to retrieve all CLL for an Entity FQN.

Following permissions are required to retrieve links: \* `datalineage.events.get` permission for the project where the link is stored for entity-level lineage. \* `datalineage.events.getFields` permission for the project where the link is stored for column-level lineage.

This method also returns processes that created the links if explicitly requested by setting [maxProcessPerLink](https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link) is non-zero and full process details are requested via `links.processes.process` in the [FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask).

Permission required to retrieve processes: \* `datalineage.processes.get` permission for the project where the process is stored.

### HTTP request

Choose an endpoint:
global africa-south1 asia-east1 asia-east2 asia-northeast1 asia-northeast2 asia-northeast3 asia-south1 asia-south2 asia-southeast1 asia-southeast2 asia-southeast3 australia-southeast1 australia-southeast2 europe-central2 europe-north1 europe-north2 europe-southwest1 europe-west1 europe-west10 europe-west12 europe-west15 europe-west2 europe-west3 europe-west4 europe-west6 europe-west8 europe-west9 me-central1 me-central2 me-west1 northamerica-northeast1 northamerica-northeast2 northamerica-south1 southamerica-east1 southamerica-west1 us-central1 us-central2 us-east1 us-east4 us-east5 us-east7 us-south1 us-west1 us-west2 us-west3 us-west4 us-west8 us eu   
`POST https://datalineage.googleapis.com/v1/{parent}:searchLineageStreaming`

<br />

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The project and location to initiate the search from. It takes the form `projects/{project}/locations/{location}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "locations": [ string ], "rootCriteria": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#RootCriteria`) }, "direction": enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchDirection`), "filters": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchFilters`) }, "limits": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchLimits`) } } ``` |

| Fields ||
|---|---|
| `locations[]` | `string` Required. The locations to search in. This list should contain the location from the `parent` field. |
| `rootCriteria` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#RootCriteria`)`` Required. Criteria for the root of the search. |
| `direction` | ``enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchDirection`)`` Required. Direction of the search. |
| `filters` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchFilters`)`` Optional. Filters for the search. |
| `limits` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#SearchLimits`)`` Optional. Limits for the search. |

### Response body

Response message for `https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreaming`.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "links": [ { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageLink`) } ], "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `links[]` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageLink`)`` Output only. The lineage links that match the search criteria. Can be empty if no links match. |
| `unreachable[]` | `string` Unordered list. Unreachable resources. If non-empty, the result set might be incomplete. Currently, only locations are supported. Format: `projects/[PROJECT_NUMBER]/locations/[LOCATION]` Example: projects/123456789/locations/us-east1 |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/datalineage.readonly`
- `https://www.googleapis.com/auth/datalineage.read-write`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `datalineage.locations.searchLinks`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## RootCriteria

Criteria for the root of the search.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "entities": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/MultipleEntityReference`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Criteria for the root of the search. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `entities` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/MultipleEntityReference`)`` Optional. The entities to initiate the search from. Entities can be specified by FQN only, or by FQN and field. To search by FQN and all available fields for that FQN, use the wildcard `*` as the field value. |
| End of mutually exclusive fields. ||

## SearchDirection

Direction of the search.

| Enums ||
|---|---|
| `SEARCH_DIRECTION_UNSPECIFIED` | Direction is unspecified. |
| `DOWNSTREAM` | Retrieve links that lead from the specified asset to downstream assets. |
| `UPSTREAM` | Retrieve links that lead from upstream assets to the specified asset. |

## SearchFilters

Filters for the search.

| JSON representation |
|---|
| ``` { "dependencyTypes": [ enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#DependencyType`) ], "entitySet": enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#EntitySet`), "timeRange": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#Interval`) } } ``` |

| Fields ||
|---|---|
| `dependencyTypes[]` | ``enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#DependencyType`)`` Optional. Types of dependencies between entities to retrieve. If unspecified, all dependency types are returned. |
| `entitySet` | ``enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#EntitySet`)`` Optional. Entity set restriction. If unspecified, the method returns all entities. |
| `timeRange` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#Interval`)`` Optional. Time interval to search for lineage. If unspecified, all lineage is returned. Currently, at most one of `startTime` and `endTime` can be set. |

## EntitySet

Entity set restriction.

| Enums ||
|---|---|
| `ENTITY_SET_UNSPECIFIED` | The entity set is unspecified. Returns all the data. |
| `ENTITIES` | Returns entities with only FQN specified. For example, entities with the `field` field set are not returned. |

## Interval

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).

The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.

| JSON representation |
|---|
| ``` { "startTime": string, "endTime": string } ``` |

| Fields ||
|---|---|
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. 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"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. 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"`. |

## SearchLimits

Limits for the search results.

| JSON representation |
|---|
| ``` { "maxDepth": integer, "maxResults": integer, "maxProcessPerLink": integer } ``` |

| Fields ||
|---|---|
| `maxDepth` | `integer` Optional. The maximum depth of the search. The default value is 5 and maximum value is 100. |
| `maxResults` | `integer` Optional. The maximum number of links to return in the response. The default value is 1_000 and the maximum value is 10_000. |
| `maxProcessPerLink` | `integer` Optional. The maximum number of processes to return per link. The default value is 0 and the maximum value is 100. If this value is non-zero, the response will contain process names for the links. To retrieve full process details in the response, include `links.processes.process` in the [FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask). |

## LineageLink

Lineage link between two entities.

| JSON representation |
|---|
| ``` { "source": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#EntityReference`) }, "target": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#EntityReference`) }, "processes": [ { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageProcess`) } ], "dependencyInfo": [ { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#DependencyInfo`) } ], "depth": integer, "location": string } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#EntityReference`)`` The entity that is the **source** of this link. |
| `target` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#EntityReference`)`` The entity that is the **target** of this link. |
| `processes[]` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#LineageProcess`)`` Processes metadata associated with the link. |
| `dependencyInfo[]` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations/searchLineageStreaming#DependencyInfo`)`` Describes how the target entity is dependent on the source entity. |
| `depth` | `integer` Depth of the current link in the graph starting from 1. |
| `location` | `string` The location where the LineageEvent that created the link is stored. |

## LineageProcess

Process metadata for the link.

| JSON representation |
|---|
| ``` { "process": { object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes#Process`) } } ``` |

| Fields ||
|---|---|
| `process` | ``object (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes#Process`)`` Process that created the link. |

## DependencyInfo

Dependency info describes how one entity is dependent on another.

| JSON representation |
|---|
| ``` { "dependencyType": enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#DependencyType`) } ``` |

| Fields ||
|---|---|
| `dependencyType` | ``enum (`https://docs.cloud.google.com/knowledge-catalog/docs/reference/data-lineage/rest/v1/projects.locations.processes.runs.lineageEvents#DependencyType`)`` The type of dependency. |