Method: indexing.datasources.updateSchema
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Aggiorna lo schema di un'origine dati. Questo metodo non esegue aggiornamenti incrementali allo schema. Questo metodo aggiorna lo schema sovrascrivendo l'intero schema.
Nota:per l'esecuzione di questa API è necessario un account amministratore o di servizio.
Richiesta HTTP
PUT https://cloudsearch.googleapis.com/v1/indexing/{name=datasources/*}/schema
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
name |
string
Il nome dell'origine dati di cui aggiornare lo schema. Formato: datasources/{sourceId}
|
Corpo della richiesta
Il corpo della richiesta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"validateOnly": boolean,
"schema": {
object (Schema )
},
"debugOptions": {
object (DebugOptions )
}
} |
Campi |
validateOnly |
boolean
Se true, la validità dello schema verrà verificata, ma non verrà registrato nell'origine dati, anche se valido.
|
schema |
object (Schema )
Il nuovo schema per l'origine.
|
debugOptions |
object (DebugOptions )
Opzioni di debug comuni.
|
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di Operation
.
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti OAuth:
https://www.googleapis.com/auth/cloud_search.settings.indexing
https://www.googleapis.com/auth/cloud_search.settings
https://www.googleapis.com/auth/cloud_search
Per ulteriori informazioni, consulta la Guida all'autorizzazione.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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)."]]