A string representation of entity’s key always have app-id & namespace as a prefix. But in most case they are not required because too obvious.
ex> Key :
ag13YXJjbG91ZC10ZXN0chsLEgVGb3JjZRihnAEMCxIIVW5pdFNsb3QYAgwafter removing appid_namespace part :
chsLEgVGb3JjZRihnAEMCxIIVW5pdFNsb3QYAgw
I know (kind,id or name) pair can be another solution for identifying unique entity but here, I just want to know how to eliminate app-id & namespace prefix and expose rest as a part of REST API…
How can I remove them?
Hey, I’m not sure how you want your REST api to work, but if you do something like
you get a string like
Grandpa/21386/Papa/21387/Kid/21388.If you just want
(kind, id_or_name)without the ancestor path, I’m not sure why you’re unhappy with'%s/%s' % (key.kind(), key.id_or_name()). You can’t remove namespace info from the way the datastore treats keys internally, but that doesn’t mean you have to display it to users.