You can only delete a schema if all of the documents associated with the schema
are deleted. Otherwise, the attempt fails. After you delete a schema, you can
call the schemas.create
method to create a new one.
To delete a schema for structured data, follow these steps:
REST
-
Find your data store ID. If you already have your data store ID, skip to the next step.
-
In the Google Cloud console, go to the Agent Builderpage and in the navigation menu, click Data Stores.
-
Click the name of your data store.
-
On the Datapage for your data store, get the data store ID.
-
-
Delete your schema.
curl -X DELETE \ -H "Authorization: Bearer $( gcloud auth print-access-token ) " \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1beta/projects/ PROJECT_ID /locations/global/collections/default_collection/dataStores/ DATA_STORE_ID /schemas/default_schema"
- PROJECT_ID : The ID of your project.
- DATA_STORE_ID : The ID of your data store.
C#
For more information, see the Vertex AI Agent Builder C# API reference documentation .
To authenticate to Vertex AI Agent Builder, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .
Go
For more information, see the Vertex AI Agent Builder Go API reference documentation .
To authenticate to Vertex AI Agent Builder, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .
Java
For more information, see the Vertex AI Agent Builder Java API reference documentation .
To authenticate to Vertex AI Agent Builder, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .
Python
For more information, see the Vertex AI Agent Builder Python API reference documentation .
To authenticate to Vertex AI Agent Builder, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .
Ruby
For more information, see the Vertex AI Agent Builder Ruby API reference documentation .
To authenticate to Vertex AI Agent Builder, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .