от
Я имущими это правило:
    match /dings/{userId}/ding/{dingId} {
        allow create;
    }
и я хотел бы создать новый документ, хотя и остальные API, поэтому я делаю этот призыв:
$.post(
 'https://firestore.googleapis.com/v1beta1/projects/XXXXXXXX/databases/(default)/documents/dings/1234/ding?key=XXXXXXX', 
 { 
  fields: {
    accountId: { stringValue: '1234'  },
    siteId: { stringValue: '4567'  },
    key: { stringValue: ''  },
    value: { stringValue: ''  }
  }
 }
)
но я получаю эту ошибку:
{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"fields[siteId][stringValue]\": Cannot bind query parameter. Field 'fields[siteId][stringValue]' could not be found in request message.\nInvalid JSON payload received. Unknown name \"fields[key][stringValue]\": Cannot bind query parameter. Field 'fields[key][stringValue]' could not be found in request message.\nInvalid JSON payload received. Unknown name \"fields[accountId][stringValue]\": Cannot bind query parameter. Field 'fields[accountId][stringValue]' could not be found in request message.\nInvalid JSON payload received. Unknown name \"fields[value][stringValue]\": Cannot bind query parameter. Field 'fields[value][stringValue]' could not be found in request message.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "description": "Invalid JSON payload received. Unknown name \"fields[siteId][stringValue]\": Cannot bind query parameter. Field 'fields[siteId][stringValue]' could not be found in request message."
          },
          {
            "description": "Invalid JSON payload received. Unknown name \"fields[key][stringValue]\": Cannot bind query parameter. Field 'fields[key][stringValue]' could not be found in request message."
          },
          {
            "description": "Invalid JSON payload received. Unknown name \"fields[accountId][stringValue]\": Cannot bind query parameter. Field 'fields[accountId][stringValue]' could not be found in request message."
          },
          {
            "description": "Invalid JSON payload received. Unknown name \"fields[value][stringValue]\": Cannot bind query parameter. Field 'fields[value][stringValue]' could not be found in request message."
          }
        ]
      }
    ]
  }
}
Я не понимаю, как правильно оформить этот запрос.

Ваш ответ

Отображаемое имя (по желанию):
Конфиденциальность: Ваш электронный адрес будет использоваться только для отправки уведомлений.
...