> This is the Markdown version of the page. For the complete Lattice Developers documentation index, fetch https://developer.anduril.com/llms.txt. Append .md to any page URL for its clean Markdown.

# Query ingress streams

POST https://example.developer.anduril.com/api/v1/video/ingress_streams/query
Content-Type: application/json

Returns the ingress streams that match the filter, newest first. Streams
 created through this API come first, then streams discovered on the mesh, and
 each group starts with its newest stream. For a discovered stream, "created"
 means when Video Manager first saw it.

Reference: https://developer.anduril.com/reference/rest/video/query-ingress-streams

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a QueryIngressStreamsRequest.

- `pageSize` (integer, optional) — How many streams to return per page. Defaults to 50, and values above 100 count as 100. A page can contain fewer streams than you asked for.
- `pageToken` (string, optional) — To get the next page, pass the `nextPageToken` from the previous response. Leave it empty for the first page. Send the same filter on every page: the server rejects a token if the filter changed, or if the token came from ListIngressStreams.
- `filter` (IngressStreamFilter, optional) — Which streams to return. Leave it out to return every stream you can see.

## Response

### 200

OK

- `ingressStreams` (list of IngressStream, optional) — Up to `pageSize` streams, newest first. Streams created through this API come first, then streams discovered on the mesh, and each group starts with its newest stream.
- `nextPageToken` (string, optional) — Pass this back as `pageToken` to get the next page. Empty when there are no more pages.

## Errors

### 400 Bad Request Error

The request was malformed or violated a precondition. Possible causes include missing required fields, an unsupported value, an `oneof` with zero or more than one variant set, a malformed URL, or a state-based precondition such as the source ingress stream not being live.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 401 Unauthorized Error

The request was rejected because the bearer token was missing, malformed, or could not be resolved to a user identity.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 403 Forbidden Error

The caller is authenticated but lacks permission for the requested resource.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 500 Internal Server Error

An unexpected error occurred while processing the request. The ingress or egress backend may have failed, or an underlying storage operation may have failed. Retry with backoff.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

### 503 Service Unavailable Error

The service is temporarily unable to handle the request, such as during startup or when a backend dependency is shutting down. The response carries a RetryInfo hint (typically around 2 seconds); clients should retry per that hint.

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of google.protobuf.Any, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

## Types

### IngressStreamFilter

Chooses which streams QueryIngressStreams returns. A stream must match every field you set. For a field that takes a list, the stream only needs to match one value in it. Fields you leave out don't limit the results. The server rejects unrecognized values, so a typo never quietly returns more streams than you asked for. The filter only works within the streams you already have permission to see.

- `creator` (CreatorFilter, optional) — Returns only streams that match by who created them. Leave it out to include every creator.
- `ingressId` (StringFilter, optional) — Returns only streams whose ingress ID matches. Compares against the part of `ingress_id` before any `#`. For a stream you created, that's the ID you chose.
- `title` (StringFilter, optional) — Returns only streams whose title matches.
- `statuses` (list of enum, optional) — Returns only streams in one of these statuses.
  - Allowed values: `STREAM_STATUS_UNSPECIFIED`, `STREAM_STATUS_LIVE`, `STREAM_STATUS_INACTIVE`, `STREAM_STATUS_UNAVAILABLE`, `STREAM_STATUS_ARCHIVED`

### IngressStream

An ingress stream represents a single source feeding frames into Lattice. Ingress streams are replicated across Lattice and visible anywhere in the deployment.

- `ingressId` (string, optional) — Unique identifier for the ingress stream.
- `title` (string, optional) — Human-readable title supplied at creation time.
- `status` (enum, optional) — Current lifecycle status of the stream. See StreamStatus for the full state machine.
  - Allowed values: `STREAM_STATUS_UNSPECIFIED`, `STREAM_STATUS_LIVE`, `STREAM_STATUS_INACTIVE`, `STREAM_STATUS_UNAVAILABLE`, `STREAM_STATUS_ARCHIVED`
- `mpegTs` (MpegTsIngress, optional) — MPEG-TS ingress connection details. MPEG-TS ingress is supported only at the edge, in closed networks; in a cloud environment reached over the public internet it may be disabled per deployment. These details are populated only when a stream was successfully created with `mpegTs`. An MPEG-TS stream created at the edge can still be listed and inspected on the IngressStream read model even when cloud ingress is disabled.
- `rtsp` (RtspIngress, optional) — RTSP ingress connection details.
- `srt` (SrtIngress, optional) — SRT ingress connection details. Returned to the producer so it knows where to push the stream.
- `createdAt` (datetime, optional) — When the stream was created. For a stream discovered on the mesh rather than created through this API, this is when Video Manager first saw it, which can reset if Video Manager restarts.
- `updatedAt` (datetime, optional) — Wall-clock time the stream's status (STREAM_STATUS) was changed. The status can change based on the activity or the deletion of the stream.
- `egressIds` (list of string, optional) — Identifiers of the egress streams currently consuming this ingress stream.

### google.protobuf.Any

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

- `@type` (string, optional) — The type of the serialized message.

### CreatorFilter

Matches streams by who created them. Set exactly one option. The server rejects the request with INVALID_ARGUMENT (HTTP 400) if you set none.

- `owned` (boolean, optional) — Set to true to return only streams you created, or false to return only streams you didn't create. Requires valid credentials. When you set it, each stream's `egressIds` lists only your own egress sessions.

### StringFilter

Matches text, treating upper and lower case as different. Set exactly one of `exact`, `prefix`, or `contains`, and give it a non-empty value. The server rejects the request with INVALID_ARGUMENT (HTTP 400) if you set none, more than one, or an empty value.

- `exact` (string, optional) — Matches text that is exactly this value. Can't be combined with `prefix` or `contains`.
- `prefix` (string, optional) — Matches text that starts with this value. Can't be combined with `exact` or `contains`.
- `contains` (string, optional) — Matches text that includes this value anywhere. Can't be combined with `exact` or `prefix`.

### MpegTsIngress

MPEG-TS ingress connection details. MPEG-TS ingress is supported only at the edge, in closed networks; in a cloud environment reached over the public internet it may be disabled per deployment. These details are populated only when a stream was successfully created with `mpegTs`. An MPEG-TS stream created at the edge can still be listed and inspected on the IngressStream read model even when cloud ingress is disabled.

- `url` (string, optional) — The URL that the producer should push the MPEG-TS stream to.

### RtspIngress

RTSP ingress connection details.

- `url` (string, optional) — The upstream RTSP URL. Lattice will pull from the supplied URL. The URL must be prefixed with `rtsp://`.

### SrtIngress

SRT ingress connection details. Returned to the producer so it knows where to push the stream.

- `url` (string, optional) — The URL the producer should push the SRT stream to.
- `sessionId` (string, optional) — Unique session identifier the producer must include on the SRT connection. See SrtSettings for context.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "ingressStreams": [
    {
      "ingressId": "string",
      "title": "string",
      "status": "STREAM_STATUS_UNSPECIFIED",
      "mpegTs": {
        "url": "string"
      },
      "rtsp": {
        "url": "string"
      },
      "srt": {
        "url": "string",
        "sessionId": "string"
      },
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z",
      "egressIds": [
        "string"
      ]
    }
  ],
  "nextPageToken": "string"
}
```