Q: sg user haven't created, but can get document

hi,

root@ubuntuvpn:~# curl http://device21:123456@localhost:4985/kitchen/company1:device21:doc11111

{"_id":"company1:device21:doc11111","_rev":"1-5b41557733ce7b7072fcbd9ab9f4c56e","allDevicesChannels":["device11","device21"],"channels":["device21"],"className":"Device","deviceName":"点餐宝1","hasRole":"order","owner":"comapny1"}

I can use devic21 sg user get the document, but when I inspect sg user, it’s not existed.

curl http://localhost:4985/kitchen/_user/

["admin","company1","device11","test"]

why?

thanks!

angular

HI @angular, you do not need sguser when you create document with admin API. You need sguser when you create document with public API(4984 port) and which does not have guest user on sg-config.

1 Like

HI @sridevi.saragadam

thanks! it’s my use mistake.

angular