# Method: projects.locations.corpora.assets.generateHlsUri

- [HTTP request](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.GenerateHlsUriResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets/generateHlsUri#body.aspect_1)

Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

### HTTP request

`POST https://visionai.googleapis.com/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the asset to request clips for. Format: `projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "temporalPartitions": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`) } ], "liveViewEnabled": boolean } ``` |

| Fields ||
|---|---|
| `temporalPartitions[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`)`` The time range to request clips for. Will be ignored if `get_live_view` is set to True. The total time range requested should be smaller than 24h. |
| `liveViewEnabled` | `boolean` Option to exclusively show a livestream of the asset with up to 3 minutes of backlog data. |

### Response body

Response message for assets.generateHlsUri API.

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

| JSON representation |
|---|
| ``` { "uri": string, "temporalPartitions": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`) } ] } ``` |

| Fields ||
|---|---|
| `uri` | `string` A signed uri to download the HLS manifest corresponding to the requested times. |
| `temporalPartitions[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`)`` A list of temporal partitions of the content returned in the order they appear in the stream. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

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

### IAM Permissions

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

- `visionai.assets.generateHlsUri`

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