I’ve got most of CRUD working on my Firestore main collections, including POST, through the Data Configurator. I’ve got subcollection document retrieval working - but when I go and try to POST a document into a subcollection (specifically, one that I can successfully get a collection and get a record from), it fails - even when I pattern it off of the successful POST of a top-level collection, and follow the path from the successful GET’s from the same collection I’m trying to POST to. I don’t get it… No documentation covers POSTing to subcollections - What simple thing am I missing?
It fails with a 400:
Error: JSON error response from server: {“error”:{“code”:400,“message”:“Invalid value at ‘document.fields[0].value’ (type.googleapis.com/google.firestore.v1beta1.Value), “Jamey-Fighter”\nInvalid value at ‘document.fields[1].value’ (type.googleapis.com/google.firestore.v1beta1.Value), 6\nInvalid value at ‘document.fields[2].value’ (type.googleapis.com/google.firestore.v1beta1.Value), “run down tunnel””,“status”:“INVALID_ARGUMENT”,“details”:[{"@type":“type.googleapis.com/google.rpc.BadRequest",“fieldViolations”:[{“field”:“document.fields[0].value”,“description”:"Invalid value at ‘document.fields[0].value’ (type.googleapis.com/google.firestore.v1beta1.Value), “Jamey-Fighter””},{“field”:“document.fields[1].value”,“description”:“Invalid value at ‘document.fields[1].value’ (type.googleapis.com/google.firestore.v1beta1.Value), 6”},{“field”:“document.fields[2].value”,“description”:“Invalid value at ‘document.fields[2].value’ (type.googleapis.com/google.firestore.v1beta1.Value), “run down tunnel””}]}]}}.status: 400
Resource settings for Create record (POST)
Resource URL: https://firestore.googleapis.com/v1beta1/projects/rpg-event-tracker/databases/(default)/documents/
Relative path: games/{gameID}/sessions/{SessionID}/events