My firestore DB structure: 2020/abhishek/friend-requests/ where 2020 is a collection, abhishek is a document and friend-requests is a collection inside the document.
What am I trying to do?
I'm trying to create a new document inside friend-requests using REST API.
What I did so far?
I made a POST request to this endpoint: https://firestore.googleapis.com/v1/projects/fuze-eee88/databases/(default)/documents/2020/abhishek/friend-requests/?documentId=newdocument
Request body:
{
"fields": {
"status": {
"booleanValue":"true"
}
}
}
The error I get:
{
"error": {
"code": 400,
"message": "Document parent name \"projects/fuze-eee88/databases/(default)/documents/2020//abhishek\" lacks a resource id at index 55.",
"status": "INVALID_ARGUMENT"
}
}