1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="firestore_v1.html">Cloud Firestore API</a> . <a href="firestore_v1.projects.html">projects</a> . <a href="firestore_v1.projects.databases.html">databases</a> . <a href="firestore_v1.projects.databases.collectionGroups.html">collectionGroups</a> . <a href="firestore_v1.projects.databases.collectionGroups.fields.html">fields</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 79<p class="firstline">Gets the metadata and configuration for a Field.</p> 80<p class="toc_element"> 81 <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</a></code></p> 82<p class="firstline">Lists the field configuration and metadata for this database.</p> 83<p class="toc_element"> 84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 85<p class="firstline">Retrieves the next page of results.</p> 86<p class="toc_element"> 87 <code><a href="#patch">patch(name, body, updateMask=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Updates a field configuration. Currently, field updates apply only to</p> 89<h3>Method Details</h3> 90<div class="method"> 91 <code class="details" id="get">get(name, x__xgafv=None)</code> 92 <pre>Gets the metadata and configuration for a Field. 93 94Args: 95 name: string, A name of the form 96`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` (required) 97 x__xgafv: string, V1 error format. 98 Allowed values 99 1 - v1 error format 100 2 - v2 error format 101 102Returns: 103 An object of the form: 104 105 { # Represents a single field in the database. 106 # 107 # Fields are grouped by their "Collection Group", which represent all 108 # collections in the database with the same id. 109 "indexConfig": { # The index configuration for this field. # The index configuration for this field. If unset, field indexing will 110 # revert to the configuration defined by the `ancestor_field`. To 111 # explicitly remove all indexes for this field, specify an index config 112 # with an empty list of indexes. 113 "reverting": True or False, # Output only 114 # When true, the `Field`'s index configuration is in the process of being 115 # reverted. Once complete, the index config will transition to the same 116 # state as the field specified by `ancestor_field`, at which point 117 # `uses_ancestor_config` will be `true` and `reverting` will be `false`. 118 "usesAncestorConfig": True or False, # Output only. 119 # When true, the `Field`'s index configuration is set from the 120 # configuration specified by the `ancestor_field`. 121 # When false, the `Field`'s index configuration is defined explicitly. 122 "ancestorField": "A String", # Output only. 123 # Specifies the resource name of the `Field` from which this field's 124 # index configuration is set (when `uses_ancestor_config` is true), 125 # or from which it *would* be set if this field had no index configuration 126 # (when `uses_ancestor_config` is false). 127 "indexes": [ # The indexes supported for this field. 128 { # Cloud Firestore indexes enable simple and complex queries against 129 # documents in a database. 130 "fields": [ # The fields supported by this index. 131 # 132 # For composite indexes, this is always 2 or more fields. 133 # The last field entry is always for the field path `__name__`. If, on 134 # creation, `__name__` was not specified as the last field, it will be added 135 # automatically with the same direction as that of the last field defined. If 136 # the final field in a composite index is not directional, the `__name__` 137 # will be ordered ASCENDING (unless explicitly specified). 138 # 139 # For single field indexes, this will always be exactly one entry with a 140 # field path equal to the field path of the associated field. 141 { # A field in an index. 142 # The field_path describes which field is indexed, the value_mode describes 143 # how the field value is indexed. 144 "fieldPath": "A String", # Can be __name__. 145 # For single field indexes, this must match the name of the field or may 146 # be omitted. 147 "order": "A String", # Indicates that this field supports ordering by the specified order or 148 # comparing using =, <, <=, >, >=. 149 "arrayConfig": "A String", # Indicates that this field supports operations on `array_value`s. 150 }, 151 ], 152 "queryScope": "A String", # Indexes with a collection query scope specified allow queries 153 # against a collection that is the child of a specific document, specified at 154 # query time, and that has the same collection id. 155 # 156 # Indexes with a collection group query scope specified allow queries against 157 # all collections descended from a specific document, specified at query 158 # time, and that have the same collection id as this index. 159 "state": "A String", # Output only. 160 # The serving state of the index. 161 "name": "A String", # Output only. 162 # A server defined name for this index. 163 # The form of this name for composite indexes will be: 164 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` 165 # For single field indexes, this field will be empty. 166 }, 167 ], 168 }, 169 "name": "A String", # A field name of the form 170 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` 171 # 172 # A field path may be a simple field name, e.g. `address` or a path to fields 173 # within map_value , e.g. `address.city`, 174 # or a special field path. The only valid special field is `*`, which 175 # represents any field. 176 # 177 # Field paths may be quoted using ` (backtick). The only character that needs 178 # to be escaped within a quoted field path is the backtick character itself, 179 # escaped using a backslash. Special characters in field paths that 180 # must be quoted include: `*`, `.`, 181 # ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. 182 # 183 # Examples: 184 # (Note: Comments here are written in markdown syntax, so there is an 185 # additional layer of backticks to represent a code block) 186 # `\`address.city\`` represents a field named `address.city`, not the map key 187 # `city` in the field `address`. 188 # `\`*\`` represents a field named `*`, not any field. 189 # 190 # A special `Field` contains the default indexing settings for all fields. 191 # This field's resource name is: 192 # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` 193 # Indexes defined on this `Field` will be applied to all fields which do not 194 # have their own `Field` index configuration. 195 }</pre> 196</div> 197 198<div class="method"> 199 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</code> 200 <pre>Lists the field configuration and metadata for this database. 201 202Currently, FirestoreAdmin.ListFields only supports listing fields 203that have been explicitly overridden. To issue this query, call 204FirestoreAdmin.ListFields with the filter set to 205`indexConfig.usesAncestorConfig:false`. 206 207Args: 208 parent: string, A parent name of the form 209`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` (required) 210 pageToken: string, A page token, returned from a previous call to 211FirestoreAdmin.ListFields, that may be used to get the next 212page of results. 213 x__xgafv: string, V1 error format. 214 Allowed values 215 1 - v1 error format 216 2 - v2 error format 217 pageSize: integer, The number of results to return. 218 filter: string, The filter to apply to list results. Currently, 219FirestoreAdmin.ListFields only supports listing fields 220that have been explicitly overridden. To issue this query, call 221FirestoreAdmin.ListFields with the filter set to 222`indexConfig.usesAncestorConfig:false`. 223 224Returns: 225 An object of the form: 226 227 { # The response for FirestoreAdmin.ListFields. 228 "nextPageToken": "A String", # A page token that may be used to request another page of results. If blank, 229 # this is the last page. 230 "fields": [ # The requested fields. 231 { # Represents a single field in the database. 232 # 233 # Fields are grouped by their "Collection Group", which represent all 234 # collections in the database with the same id. 235 "indexConfig": { # The index configuration for this field. # The index configuration for this field. If unset, field indexing will 236 # revert to the configuration defined by the `ancestor_field`. To 237 # explicitly remove all indexes for this field, specify an index config 238 # with an empty list of indexes. 239 "reverting": True or False, # Output only 240 # When true, the `Field`'s index configuration is in the process of being 241 # reverted. Once complete, the index config will transition to the same 242 # state as the field specified by `ancestor_field`, at which point 243 # `uses_ancestor_config` will be `true` and `reverting` will be `false`. 244 "usesAncestorConfig": True or False, # Output only. 245 # When true, the `Field`'s index configuration is set from the 246 # configuration specified by the `ancestor_field`. 247 # When false, the `Field`'s index configuration is defined explicitly. 248 "ancestorField": "A String", # Output only. 249 # Specifies the resource name of the `Field` from which this field's 250 # index configuration is set (when `uses_ancestor_config` is true), 251 # or from which it *would* be set if this field had no index configuration 252 # (when `uses_ancestor_config` is false). 253 "indexes": [ # The indexes supported for this field. 254 { # Cloud Firestore indexes enable simple and complex queries against 255 # documents in a database. 256 "fields": [ # The fields supported by this index. 257 # 258 # For composite indexes, this is always 2 or more fields. 259 # The last field entry is always for the field path `__name__`. If, on 260 # creation, `__name__` was not specified as the last field, it will be added 261 # automatically with the same direction as that of the last field defined. If 262 # the final field in a composite index is not directional, the `__name__` 263 # will be ordered ASCENDING (unless explicitly specified). 264 # 265 # For single field indexes, this will always be exactly one entry with a 266 # field path equal to the field path of the associated field. 267 { # A field in an index. 268 # The field_path describes which field is indexed, the value_mode describes 269 # how the field value is indexed. 270 "fieldPath": "A String", # Can be __name__. 271 # For single field indexes, this must match the name of the field or may 272 # be omitted. 273 "order": "A String", # Indicates that this field supports ordering by the specified order or 274 # comparing using =, <, <=, >, >=. 275 "arrayConfig": "A String", # Indicates that this field supports operations on `array_value`s. 276 }, 277 ], 278 "queryScope": "A String", # Indexes with a collection query scope specified allow queries 279 # against a collection that is the child of a specific document, specified at 280 # query time, and that has the same collection id. 281 # 282 # Indexes with a collection group query scope specified allow queries against 283 # all collections descended from a specific document, specified at query 284 # time, and that have the same collection id as this index. 285 "state": "A String", # Output only. 286 # The serving state of the index. 287 "name": "A String", # Output only. 288 # A server defined name for this index. 289 # The form of this name for composite indexes will be: 290 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` 291 # For single field indexes, this field will be empty. 292 }, 293 ], 294 }, 295 "name": "A String", # A field name of the form 296 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` 297 # 298 # A field path may be a simple field name, e.g. `address` or a path to fields 299 # within map_value , e.g. `address.city`, 300 # or a special field path. The only valid special field is `*`, which 301 # represents any field. 302 # 303 # Field paths may be quoted using ` (backtick). The only character that needs 304 # to be escaped within a quoted field path is the backtick character itself, 305 # escaped using a backslash. Special characters in field paths that 306 # must be quoted include: `*`, `.`, 307 # ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. 308 # 309 # Examples: 310 # (Note: Comments here are written in markdown syntax, so there is an 311 # additional layer of backticks to represent a code block) 312 # `\`address.city\`` represents a field named `address.city`, not the map key 313 # `city` in the field `address`. 314 # `\`*\`` represents a field named `*`, not any field. 315 # 316 # A special `Field` contains the default indexing settings for all fields. 317 # This field's resource name is: 318 # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` 319 # Indexes defined on this `Field` will be applied to all fields which do not 320 # have their own `Field` index configuration. 321 }, 322 ], 323 }</pre> 324</div> 325 326<div class="method"> 327 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 328 <pre>Retrieves the next page of results. 329 330Args: 331 previous_request: The request for the previous page. (required) 332 previous_response: The response from the request for the previous page. (required) 333 334Returns: 335 A request object that you can call 'execute()' on to request the next 336 page. Returns None if there are no more items in the collection. 337 </pre> 338</div> 339 340<div class="method"> 341 <code class="details" id="patch">patch(name, body, updateMask=None, x__xgafv=None)</code> 342 <pre>Updates a field configuration. Currently, field updates apply only to 343single field index configuration. However, calls to 344FirestoreAdmin.UpdateField should provide a field mask to avoid 345changing any configuration that the caller isn't aware of. The field mask 346should be specified as: `{ paths: "index_config" }`. 347 348This call returns a google.longrunning.Operation which may be used to 349track the status of the field update. The metadata for 350the operation will be the type FieldOperationMetadata. 351 352To configure the default field settings for the database, use 353the special `Field` with resource name: 354`projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. 355 356Args: 357 name: string, A field name of the form 358`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` 359 360A field path may be a simple field name, e.g. `address` or a path to fields 361within map_value , e.g. `address.city`, 362or a special field path. The only valid special field is `*`, which 363represents any field. 364 365Field paths may be quoted using ` (backtick). The only character that needs 366to be escaped within a quoted field path is the backtick character itself, 367escaped using a backslash. Special characters in field paths that 368must be quoted include: `*`, `.`, 369``` (backtick), `[`, `]`, as well as any ascii symbolic characters. 370 371Examples: 372(Note: Comments here are written in markdown syntax, so there is an 373 additional layer of backticks to represent a code block) 374`\`address.city\`` represents a field named `address.city`, not the map key 375`city` in the field `address`. 376`\`*\`` represents a field named `*`, not any field. 377 378A special `Field` contains the default indexing settings for all fields. 379This field's resource name is: 380`projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` 381Indexes defined on this `Field` will be applied to all fields which do not 382have their own `Field` index configuration. (required) 383 body: object, The request body. (required) 384 The object takes the form of: 385 386{ # Represents a single field in the database. 387 # 388 # Fields are grouped by their "Collection Group", which represent all 389 # collections in the database with the same id. 390 "indexConfig": { # The index configuration for this field. # The index configuration for this field. If unset, field indexing will 391 # revert to the configuration defined by the `ancestor_field`. To 392 # explicitly remove all indexes for this field, specify an index config 393 # with an empty list of indexes. 394 "reverting": True or False, # Output only 395 # When true, the `Field`'s index configuration is in the process of being 396 # reverted. Once complete, the index config will transition to the same 397 # state as the field specified by `ancestor_field`, at which point 398 # `uses_ancestor_config` will be `true` and `reverting` will be `false`. 399 "usesAncestorConfig": True or False, # Output only. 400 # When true, the `Field`'s index configuration is set from the 401 # configuration specified by the `ancestor_field`. 402 # When false, the `Field`'s index configuration is defined explicitly. 403 "ancestorField": "A String", # Output only. 404 # Specifies the resource name of the `Field` from which this field's 405 # index configuration is set (when `uses_ancestor_config` is true), 406 # or from which it *would* be set if this field had no index configuration 407 # (when `uses_ancestor_config` is false). 408 "indexes": [ # The indexes supported for this field. 409 { # Cloud Firestore indexes enable simple and complex queries against 410 # documents in a database. 411 "fields": [ # The fields supported by this index. 412 # 413 # For composite indexes, this is always 2 or more fields. 414 # The last field entry is always for the field path `__name__`. If, on 415 # creation, `__name__` was not specified as the last field, it will be added 416 # automatically with the same direction as that of the last field defined. If 417 # the final field in a composite index is not directional, the `__name__` 418 # will be ordered ASCENDING (unless explicitly specified). 419 # 420 # For single field indexes, this will always be exactly one entry with a 421 # field path equal to the field path of the associated field. 422 { # A field in an index. 423 # The field_path describes which field is indexed, the value_mode describes 424 # how the field value is indexed. 425 "fieldPath": "A String", # Can be __name__. 426 # For single field indexes, this must match the name of the field or may 427 # be omitted. 428 "order": "A String", # Indicates that this field supports ordering by the specified order or 429 # comparing using =, <, <=, >, >=. 430 "arrayConfig": "A String", # Indicates that this field supports operations on `array_value`s. 431 }, 432 ], 433 "queryScope": "A String", # Indexes with a collection query scope specified allow queries 434 # against a collection that is the child of a specific document, specified at 435 # query time, and that has the same collection id. 436 # 437 # Indexes with a collection group query scope specified allow queries against 438 # all collections descended from a specific document, specified at query 439 # time, and that have the same collection id as this index. 440 "state": "A String", # Output only. 441 # The serving state of the index. 442 "name": "A String", # Output only. 443 # A server defined name for this index. 444 # The form of this name for composite indexes will be: 445 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` 446 # For single field indexes, this field will be empty. 447 }, 448 ], 449 }, 450 "name": "A String", # A field name of the form 451 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` 452 # 453 # A field path may be a simple field name, e.g. `address` or a path to fields 454 # within map_value , e.g. `address.city`, 455 # or a special field path. The only valid special field is `*`, which 456 # represents any field. 457 # 458 # Field paths may be quoted using ` (backtick). The only character that needs 459 # to be escaped within a quoted field path is the backtick character itself, 460 # escaped using a backslash. Special characters in field paths that 461 # must be quoted include: `*`, `.`, 462 # ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. 463 # 464 # Examples: 465 # (Note: Comments here are written in markdown syntax, so there is an 466 # additional layer of backticks to represent a code block) 467 # `\`address.city\`` represents a field named `address.city`, not the map key 468 # `city` in the field `address`. 469 # `\`*\`` represents a field named `*`, not any field. 470 # 471 # A special `Field` contains the default indexing settings for all fields. 472 # This field's resource name is: 473 # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` 474 # Indexes defined on this `Field` will be applied to all fields which do not 475 # have their own `Field` index configuration. 476 } 477 478 updateMask: string, A mask, relative to the field. If specified, only configuration specified 479by this field_mask will be updated in the field. 480 x__xgafv: string, V1 error format. 481 Allowed values 482 1 - v1 error format 483 2 - v2 error format 484 485Returns: 486 An object of the form: 487 488 { # This resource represents a long-running operation that is the result of a 489 # network API call. 490 "metadata": { # Service-specific metadata associated with the operation. It typically 491 # contains progress information and common metadata such as create time. 492 # Some services might not provide such metadata. Any method that returns a 493 # long-running operation should document the metadata type, if any. 494 "a_key": "", # Properties of the object. Contains field @type with type URL. 495 }, 496 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 497 # different programming environments, including REST APIs and RPC APIs. It is 498 # used by [gRPC](https://github.com/grpc). The error model is designed to be: 499 # 500 # - Simple to use and understand for most users 501 # - Flexible enough to meet unexpected needs 502 # 503 # # Overview 504 # 505 # The `Status` message contains three pieces of data: error code, error 506 # message, and error details. The error code should be an enum value of 507 # google.rpc.Code, but it may accept additional error codes if needed. The 508 # error message should be a developer-facing English message that helps 509 # developers *understand* and *resolve* the error. If a localized user-facing 510 # error message is needed, put the localized message in the error details or 511 # localize it in the client. The optional error details may contain arbitrary 512 # information about the error. There is a predefined set of error detail types 513 # in the package `google.rpc` that can be used for common error conditions. 514 # 515 # # Language mapping 516 # 517 # The `Status` message is the logical representation of the error model, but it 518 # is not necessarily the actual wire format. When the `Status` message is 519 # exposed in different client libraries and different wire protocols, it can be 520 # mapped differently. For example, it will likely be mapped to some exceptions 521 # in Java, but more likely mapped to some error codes in C. 522 # 523 # # Other uses 524 # 525 # The error model and the `Status` message can be used in a variety of 526 # environments, either with or without APIs, to provide a 527 # consistent developer experience across different environments. 528 # 529 # Example uses of this error model include: 530 # 531 # - Partial errors. If a service needs to return partial errors to the client, 532 # it may embed the `Status` in the normal response to indicate the partial 533 # errors. 534 # 535 # - Workflow errors. A typical workflow has multiple steps. Each step may 536 # have a `Status` message for error reporting. 537 # 538 # - Batch operations. If a client uses batch request and batch response, the 539 # `Status` message should be used directly inside batch response, one for 540 # each error sub-response. 541 # 542 # - Asynchronous operations. If an API call embeds asynchronous operation 543 # results in its response, the status of those operations should be 544 # represented directly using the `Status` message. 545 # 546 # - Logging. If some API errors are stored in logs, the message `Status` could 547 # be used directly after any stripping needed for security/privacy reasons. 548 "message": "A String", # A developer-facing error message, which should be in English. Any 549 # user-facing error message should be localized and sent in the 550 # google.rpc.Status.details field, or localized by the client. 551 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 552 "details": [ # A list of messages that carry the error details. There is a common set of 553 # message types for APIs to use. 554 { 555 "a_key": "", # Properties of the object. Contains field @type with type URL. 556 }, 557 ], 558 }, 559 "done": True or False, # If the value is `false`, it means the operation is still in progress. 560 # If `true`, the operation is completed, and either `error` or `response` is 561 # available. 562 "response": { # The normal response of the operation in case of success. If the original 563 # method returns no data on success, such as `Delete`, the response is 564 # `google.protobuf.Empty`. If the original method is standard 565 # `Get`/`Create`/`Update`, the response should be the resource. For other 566 # methods, the response should have the type `XxxResponse`, where `Xxx` 567 # is the original method name. For example, if the original method name 568 # is `TakeSnapshot()`, the inferred response type is 569 # `TakeSnapshotResponse`. 570 "a_key": "", # Properties of the object. Contains field @type with type URL. 571 }, 572 "name": "A String", # The server-assigned name, which is only unique within the same service that 573 # originally returns it. If you use the default HTTP mapping, the 574 # `name` should have the format of `operations/some/unique/name`. 575 }</pre> 576</div> 577 578</body></html>