GAE NDB Datastore new feature: Access Datastore entities from other GAE app
<p>Reading the new documentation of GAE NDB Datastore:
<a href="https://cloud.google.com/appengine/docs/python/ndb/modelclass#class_methods" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/python/ndb/modelclass#class_methods</a></p>

<blockquote>
<pre><code>get_by_id(id, parent=None, app=None, namespace=None, **ctx_options)
</code></pre>
  
  <p>Returns an entity by ID. This is really just a shorthand for <code>Key(cls, id).get()</code>.</p>
  
  <p>Arguments</p>
  
  <p><code>id</code> A string or integer key ID. parent Parent key of the model to
  get.</p>
  
  <p><code>app</code> (keyword arg) ID of app. If not specified, gets data for current
  app.</p>
  
  <p><code>namespace</code> (keyword arg) Namespace. If not specified, gets data for
  default namespace.</p>
  
  <p><code>**ctx_options</code> Context options Returns a model instance or None if not found.</p>
</blockquote>

<p>I discover this new <code>app</code> parameter.  This is what I needed since a long time ago!!!!!
I just tried to access datastore of app "xxxxxdev" from app "xxxxxglobal" but i get this error:</p>

<pre><code>File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1373, in check_rpc_success
    raise _ToDatastoreError(err)
BadRequestError: app s~xxxxxglobal cannot access app xxxxxxdev's data
</code></pre>

<p>I added the accounts services  xxxxxdev@appspot.gserviceaccount.com and xxxxxglobal@appspot.gserviceaccount.com as admin of the each other in this link:
<a href="https://console.cloud.google.com/iam-admin/iam/" rel="nofollow noreferrer">https://console.cloud.google.com/iam-admin/iam/</a></p>

<p>But I still receive the problem.</p>

<p>Can anyone help me? I need to know where in the control panel I can grant datastore access to other app in App Engine.</p>