Method: projects.databases.collectionGroups.fields.patch

Updates a field configuration. Currently, field updates apply only to single field index configuration. However, calls to FirestoreAdmin.UpdateField should provide a field mask to avoid changing any configuration that the caller isn't aware of. The field mask should be specified as: { paths: "indexConfig" }.

This call returns a google.longrunning.Operation which may be used to track the status of the field update. The metadata for the operation will be the type FieldOperationMetadata.

To configure the default field settings for the database, use the special Field with resource name: projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



A field name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collectionId}/fields/{fieldPath}

A field path may be a simple field name, e.g. address or a path to fields within mapValue , e.g., or a special field path. The only valid special field is *, which represents any field.

Field paths may be quoted using (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include:*,., ``` (backtick),[,]`, as well as any ascii symbolic characters.

Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) \`represents a field, not the map key cityin the fieldaddress. `*`represents a field named*`, not any field.

A special Field contains the default indexing settings for all fields. This field's resource name is: projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/* Indexes defined on this Field will be applied to all fields which do not have their own Field index configuration.

Query parameters


string (FieldMask format)

A mask, relative to the field. If specified, only configuration specified by this field_mask will be updated in the field.

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of Field.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.

Hai trovato utile questa pagina? Facci sapere cosa ne pensi:

Invia feedback per...

Cloud Firestore