LOCATION_ID: The region where you are using
Vertex AI Vision. For example: us-central1, europe-west4. See available regions.
DISPLAY_NAME: Display name for the warehouse.
WAREHOUSE_DESCRIPTION: The description of the warehouse (corpus).
TIME_TO_LIVE: The amount of time to live (TTL) for all assets under a corpus, or
the TTL of a specific asset. For example, for a corpus with assets with a TTL of 100 days,
provide the value 8640000 (seconds).
HTTP method and URL:
POST https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora
Updates an existing corpus under the given project with the option to update
display name, description, default TTL, or update all available fields.
REST & CMD LINE
Updates an existing corpus resource under the given project. This sample
shows you how to update the corpus display name, but you can also update
description, TTL, or all fields at once using the same URL format and
updated request body.
Before using any of the request data,
make the following replacements:
REGIONALIZED_ENDPOINT: Endpoint might include a prefix matching the LOCATION_ID such
as europe-west4-. See more about
regionalized endpoints.
LOCATION_ID: The region where you are using
Vertex AI Vision. For example: us-central1, europe-west4. See available regions.
CORPUS_ID: The ID of your target corpus.
?updateMask=fieldToUpdate: One of the available fields you can
apply an updateMask to. Specify the corresponding new field value in the request
body. This new value replaces the existing field value. Available fields:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Create and update a Streaming video warehouse\n\nA Vision Warehouse is a component you can add to your app to store\nmodel output and streaming data.\n\nCreate a streaming video warehouse\n----------------------------------\n\nTo connect other component nodes of your app graph to a warehouse you must\nfirst create a streaming video warehouse.\n\n\n| **Caution**: Vertex AI Vision doesn't support a stream's usage in multiple apps connected to a warehouse ; one stream can be associated with only one warehouse export destination.\n\n\u003cbr /\u003e\n\n**Note:** You can also create a streaming video warehouse from the application graph builder page. See [Build an application](/vision-ai/docs/build-app#connect-warehousepp) for more details. \n\n### Console\n\n1. Open the **Warehouses** tab of the Vertex AI Vision dashboard.\n\n [Go to the Warehouses tab](https://console.cloud.google.com/ai/vision-ai/media-warehouse)\n2. Select add**Create**.\n\n3. Add a name for the warehouse and choose a\n [time to live (TTL)](https://en.wikipedia.org/wiki/Time_to_live#:%7E:text=Time%20to%20live%20(TTL)%20or,data%20is%20discarded%20or%20revalidated.)\n period for assets stored in the warehouse. These values can be modified\n later.\n\n After a warehouse is created\n you can [add the warehouse](/vision-ai/docs/build-app#connect-warehousepp) to an application graph.\n\n### REST \\& CMD LINE\n\nCreates a new `corpus` resource under the given project with the option to\nspecify the `corpus` display name, description and a TTL.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eREGIONALIZED_ENDPOINT\u003c/var\u003e: Endpoint might include a prefix matching the `LOCATION_ID` such as `europe-west4-`. See more about [regionalized endpoints](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e: Your Google Cloud [project number](/resource-manager/docs/creating-managing-projects#identifying_projects).\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: The [region](/about/locations) where you are using Vertex AI Vision. For example: `us-central1`, `europe-west4`. See [available regions](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003eDISPLAY_NAME\u003c/var\u003e: Display name for the warehouse.\n- \u003cvar translate=\"no\"\u003eWAREHOUSE_DESCRIPTION\u003c/var\u003e: The description of the warehouse (`corpus`).\n- \u003cvar translate=\"no\"\u003eTIME_TO_LIVE\u003c/var\u003e: The amount of time to live (TTL) for all assets under a corpus, or the TTL of a specific asset. For example, for a corpus with assets with a TTL of 100 days, provide the value `8640000` (seconds).\n\n\nHTTP method and URL:\n\n```\nPOST https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora\n```\n\n\nRequest JSON body:\n\n```\n{\n \"display_name\": \"DISPLAY_NAME\",\n \"description\": \"WAREHOUSE_DESCRIPTION\",\n \"type\": \"STREAM_VIDEO\",\n \"default_ttl\": {\n \"seconds\": TIME_TO_LIVE\n }\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/warehouseoperations/OPERATION_ID\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.visionai.v1.CreateCorpusMetadata\"\n },\n \"done\": true,\n \"response\": {\n \"@type\": \"type.googleapis.com/google.cloud.visionai.v1.Corpus\",\n \"name\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID\",\n \"displayName\": \"DISPLAY_NAME\",\n \"description\": \"WAREHOUSE_DESCRIPTION\",\n \"type\": \"STREAM_VIDEO\",\n \"defaultTtl\": \"TIME_TO_LIVE\"\n }\n}\n```\n\n\u003cbr /\u003e\n\nUpdate a streaming video warehouse\n----------------------------------\n\nUpdates an existing corpus under the given project with the option to update\ndisplay name, description, default TTL, or update all available fields. \n\n### REST \\& CMD LINE\n\nUpdates an existing `corpus` resource under the given project. This sample\nshows you how to update the `corpus` display name, but you can also update\ndescription, TTL, or all fields at once using the same URL format and\nupdated request body.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eREGIONALIZED_ENDPOINT\u003c/var\u003e: Endpoint might include a prefix matching the `LOCATION_ID` such as `europe-west4-`. See more about [regionalized endpoints](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e: Your Google Cloud [project number](/resource-manager/docs/creating-managing-projects#identifying_projects).\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: The [region](/about/locations) where you are using Vertex AI Vision. For example: `us-central1`, `europe-west4`. See [available regions](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003eCORPUS_ID\u003c/var\u003e: The ID of your target corpus.\n- `?updateMask=`\u003cvar translate=\"no\"\u003efieldToUpdate\u003c/var\u003e: One of the available fields you can apply an `updateMask` to. Specify the corresponding new field value in the request body. This new value replaces the existing field value. Available fields:\n - Display name: `?updateMask=display_name`\n - Description: `?updateMask=description`\n - Default time-to-live (TTL): `?updateMask=default_ttl`\n - Update all fields: `?updateMask=*`\n- \u003cvar translate=\"no\"\u003eUPDATED_FIELD_VALUE\u003c/var\u003e: A new value for the specified field. In this example, a new user-provided display name for the warehouse resource.\n\n\nHTTP method and URL:\n\n```\nPATCH https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID?update_mask=\u003cvar translate=\"no\"\u003edisplay_name\u003c/var\u003e\n```\n\n\nRequest JSON body:\n\n```\n{\n \"displayName\": \"\u003cvar translate=\"no\"\u003eUPDATED_FIELD_VALUE\u003c/var\u003e\",\n \"description\": \"Original description\",\n \"defaultTtl\": {\n \"seconds\": \"7800\"\n }\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X PATCH \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID?update_mask=\u003cvar translate=\"no\"\u003edisplay_name\u003c/var\u003e\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method PATCH `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID?update_mask=\u003cvar translate=\"no\"\u003edisplay_name\u003c/var\u003e\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/PROJECT_ID/locations/LOCATION_ID/corpora/CORPORA_ID\",\n \"displayName\": \"\u003cvar translate=\"no\"\u003eUPDATED_FIELD_VALUE\u003c/var\u003e\",\n \"description\": \"Original description\",\n \"defaultTtl\": \"7800s\"\n}\n```\n\n\u003cbr /\u003e"]]