Required. The name of the ExampleStore resource that examples are added to or updated in. Format: projects/{project}/locations/{location}/exampleStores/{exampleStore}
Request body
The request body contains data with the following structure:
Required. A list of examples to be created/updated.
overwrite
boolean
Optional. A flag indicating whether an example can be overwritten if it already exists. If False (default) and the example already exists, the example will not be updated. This does not affect behavior if the example does not exist already.
The result for creating/updating a single example.
Fields
result
Union type
The outcome of creating/updating a single example. It's either the example that was successfully created/updated or a status with an error message. result can be only one of the following:
[[["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-06-27 UTC."],[],[],null,["# Method: exampleStores.upsertExamples\n\n**Full name**: projects.locations.exampleStores.upsertExamples\n\nCreate or update Examples in the Example Store. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1beta1``/{exampleStore}:upsertExamples` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`exampleStore` `string` \nRequired. The name of the ExampleStore resource that examples are added to or updated in. Format: `projects/{project}/locations/{location}/exampleStores/{exampleStore}`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `examples[]` `object (`[Example](/vertex-ai/docs/reference/rest/v1beta1/Example)`)` \nRequired. A list of examples to be created/updated.\n`overwrite` `boolean` \nOptional. A flag indicating whether an example can be overwritten if it already exists. If False (default) and the example already exists, the example will not be updated. This does not affect behavior if the example does not exist already. \n\n### Response body\n\nResponse message for [ExampleStoreService.UpsertExamples](/vertex-ai/docs/reference/rest/v1beta1/projects.locations.exampleStores/upsertExamples#google.cloud.aiplatform.v1beta1.ExampleStoreService.UpsertExamples).\n\nIf successful, the response body contains data with the following structure:\nFields `results[]` `object (`[UpsertResult](/vertex-ai/docs/reference/rest/v1beta1/projects.locations.exampleStores/upsertExamples#UpsertResult)`)` \nA list of results for creating/updating. It's either a successfully created/updated example or a status with an error message. \n\nUpsertResult\n------------\n\nThe result for creating/updating a single example.\nFields \n`result` `Union type` \nThe outcome of creating/updating a single example. It's either the example that was successfully created/updated or a status with an error message. `result` can be only one of the following:\n`example` `object (`[Example](/vertex-ai/docs/reference/rest/v1beta1/Example)`)` \nThe example created/updated successfully.\n`status` `object (`[Status](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Status)`)` \nThe error message of the example that was not created/updated successfully."]]