Trying to use rest api for google datastore (unfortunately there is no client library for c++). Got stuck on inserting an entity.
Reading documentation, which is unfortunately not very good (at least for REST). It doesn't tell what is the URI, so I am guessing it is the following:
POST https://datastore.googleapis.com/v1/projects/{projectId}:Entity
but unfortunately I get a reply:
The requested URL /v1/projects/my_project_id:Entity
was not found on this server.
Anyone out there is/was using it? Any help would be appreciated. Thanks!
Managed to find the answer. Entity is an object. Correct api call is projects.commit:
POST https://datastore.googleapis.com/v1/projects/{projectId}:commit
And then in the json object I need to pass insert mutation.
Somehow misunderstood the terminology, thought commit is needed after you do actual insert.
Here is the actual documentation link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With