You can view the schema for any data store containing data that supports a schema, such as structured data, website data with 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 AI Applications 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 websites or 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 AI Applications 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"
Replace the following:
PROJECT_ID
: the ID of your project.DATA_STORE_ID
: the ID of your data store.
C#
For more information, see the AI Applications C# API reference documentation.
To authenticate to AI Applications, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Go
For more information, see the AI Applications Go API reference documentation.
To authenticate to AI Applications, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
For more information, see the AI Applications Java API reference documentation.
To authenticate to AI Applications, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
For more information, see the AI Applications Python API reference documentation.
To authenticate to AI Applications, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Ruby
For more information, see the AI Applications Ruby API reference documentation.
To authenticate to AI Applications, 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