You can view the schema for any data store containing data that supports a schema, such as structured data or unstructured data with structured data.
You can view the schema in the Google Cloud console or by
using the dataStores.schemas.get
API method. Viewing the schema for
a website is supported only over the REST API.
Console
To view a schema in the Google Cloud console, follow these steps.
If you are viewing an auto-generated schema, make sure that you have completed data ingestion. Otherwise, the schema might not be available yet.
In the Google Cloud console, go to the Agentspace page.
In the navigation menu, click Data Stores.
In the Name column, click the data store with the schema that you want to view.
Click the Schema tab to view the schema for your data.
REST
To use the API to get the definition for your schema, follow these steps:
If you are viewing an auto-generated schema, make sure that you have completed data ingestion. Otherwise, the schema might not be available yet.
To view the schema for data stores with unstructured data with metadata, skip to Step 3 to call the
schema.get
method.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 Agentspace page and in the navigation menu, click Data Stores.
Click the name of your data store.
On the Data page for your data store, get the data store ID.
Use the
schemas.get
API method to get your schema definition.curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/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#
Before trying this sample, follow the C# setup instructions in the Agentspace Enterprise quickstart using client libraries. For more information, see the Agentspace Enterprise C# API reference documentation.
To authenticate to Agentspace Enterprise, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Go
Before trying this sample, follow the Go setup instructions in the Agentspace Enterprise quickstart using client libraries. For more information, see the Agentspace Enterprise Go API reference documentation.
To authenticate to Agentspace Enterprise, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
Before trying this sample, follow the Java setup instructions in the Agentspace Enterprise quickstart using client libraries. For more information, see the Agentspace Enterprise Java API reference documentation.
To authenticate to Agentspace Enterprise, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
Before trying this sample, follow the Python setup instructions in the Agentspace Enterprise quickstart using client libraries. For more information, see the Agentspace Enterprise Python API reference documentation.
To authenticate to Agentspace Enterprise, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Ruby
Before trying this sample, follow the Ruby setup instructions in the Agentspace Enterprise quickstart using client libraries. For more information, see the Agentspace Enterprise Ruby API reference documentation.
To authenticate to Agentspace Enterprise, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
What's next
- Provide or auto-detect a schema
- Update a schema for structured data
- Delete a schema for structured data