Firestore REST API: Query parameters type of object

前端 未结 2 646
情歌与酒
情歌与酒 2021-01-18 05:54

I am looking for an advice regarding Google Firestore REST API

I am trying to update the document but keep the data that are not updated (https://cloud.google.com/f

2条回答
  •  天命终不由人
    2021-01-18 06:14

    Each patched field needs to be included as an individual parameter in the query string.
    You can use this format for your url :

    https://firestore.googleapis.com/v1beta1/projects//databases/(default)/documents/messages/someid?updateMask.fieldPaths=message&updateMask.fieldPaths=&updateMask.fieldPaths=
    

    Fields omitted from the field mask are unchanged, regardless if they are included in the request body Document.

    You can use the Google REST API explorer to generate pre-defined URL with Query Parameters and Body from us user friendly interface:

    https://developers.google.com/apis-explorer/

提交回复
热议问题