#community-help

Querying About Scoped API Keys Usage in Typesense

TLDR Rajeev requested information about appropriate scoped API keys for a retrieve call on a collection in Typesense. Jason clarified that collections:get is the appropriate key needed.

Powered by Struct AI

1

5
15mo
Solved
Join the chat
Jul 20, 2022 (15 months ago)
Rajeev
Photo of md5-c528ac87727cc861bfd23bb8242ccfdd
Rajeev
04:20 PM
Hi ~,
Quick question regarding the scoped API keys, what is the scope that one needs to use if they want to do a retrieve call on a collection, I see as per the documentation for collections there are three scopes but none of them are read only. We are trying to do this to get schema related information of the collection and based on it do some custom rendering on the client side.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:22 PM
Here are more examples: https://typesense.org/docs/0.23.1/api/api-keys.html#sample-actions

You want to use collections:get
Rajeev
Photo of md5-c528ac87727cc861bfd23bb8242ccfdd
Rajeev
04:24 PM
Got it thanks for the prompt response, Saw the table and thought the things mentioned there are the exhaustive list, Is there any documentation to know the exhaustive list of actions that are available at different levels or all the actions are available at all the levels ??
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:26 PM
It’s closely tied to the API endpoint naming, which is why we haven’t documented it exhaustively.

If the last component of the API path is /XYZ then the resource name in permissions is XYZ:action where action can be get, delete, create
Rajeev
Photo of md5-c528ac87727cc861bfd23bb8242ccfdd
Rajeev
04:27 PM
Got it, Thanks

1