Method: indexing.datasources.updateSchema
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Aktualisiert das Schema einer Datenquelle. Bei dieser Methode werden keine inkrementellen Aktualisierungen des Schemas durchgeführt. Stattdessen wird das Schema durch Überschreiben des gesamten Schemas aktualisiert.
Hinweis:Für die Ausführung dieser API ist ein Administrator- oder Dienstkonto erforderlich.
HTTP-Anfrage
PUT https://cloudsearch.googleapis.com/v1/indexing/{name=datasources/*}/schema
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Der Name der Datenquelle, deren Schema aktualisiert werden soll. Format: datasources/{sourceId}
|
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung |
{
"validateOnly": boolean,
"schema": {
object (Schema )
},
"debugOptions": {
object (DebugOptions )
}
} |
Felder |
validateOnly |
boolean
Wenn diese Option aktiviert ist, wird das Schema auf Gültigkeit geprüft, aber nicht bei der Datenquelle registriert, auch wenn es gültig ist.
|
schema |
object (Schema )
Das neue Schema für die Quelle.
|
debugOptions |
object (DebugOptions )
Gängige Optionen zur Fehlerbehebung
|
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von Operation
.
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/cloud_search.settings.indexing
https://www.googleapis.com/auth/cloud_search.settings
https://www.googleapis.com/auth/cloud_search
Weitere Informationen finden Sie im Leitfaden zur Autorisierung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[],[],null,["# Method: indexing.datasources.updateSchema\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates the schema of a data source. This method does not perform incremental updates to the schema. Instead, this method updates the schema by overwriting the entire schema.\n\n**Note:** This API requires an admin or service account to execute.\n\n### HTTP request\n\n`PUT https://cloudsearch.googleapis.com/v1/indexing/{name=datasources/*}/schema`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|---------------------------------------------------------------------------------------|\n| `name` | `string` The name of the data source to update Schema. Format: datasources/{sourceId} |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"validateOnly\": boolean, \"schema\": { object (/workspace/cloud-search/docs/reference/rest/v1/Schema) }, \"debugOptions\": { object (/workspace/cloud-search/docs/reference/rest/v1/DebugOptions) } } ``` |\n\n| Fields ||\n|----------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `validateOnly` | `boolean` If true, the schema will be checked for validity, but will not be registered with the data source, even if valid. |\n| `schema` | `object (`[Schema](/workspace/cloud-search/docs/reference/rest/v1/Schema)`)` The new schema for the source. |\n| `debugOptions` | `object (`[DebugOptions](/workspace/cloud-search/docs/reference/rest/v1/DebugOptions)`)` Common debug options. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/workspace/cloud-search/docs/reference/rest/v1/operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud_search.settings.indexing`\n- `https://www.googleapis.com/auth/cloud_search.settings`\n- `https://www.googleapis.com/auth/cloud_search`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]