Siraj Kakeh
Siraj Kakeh

Reputation: 762

How to make an rest endpoint public in Hasura (Requires no authentication)?

Is there a way to make a rest endpoint public in Hasura?

Say I have restaurants table and I created a rest endpoint for that, say http://localhost:8080/api/rest/restaurants/:id How can I make this endpoint public?

I tried creating a new role on the table and gave it select permissions without any checks but I don't know how to set the role using rest nor there's a mention of that in the docs.

Upvotes: 1

Views: 443

Answers (1)

Vishwa Mehta
Vishwa Mehta

Reputation: 11

Exposing your REST endpoint in Hasura works the same as a GraphQL endpoint. For public access, you can configure an unauthorised role and you're good to go. You can check out our docs here to see how you can set up the unauthorised access.

Upvotes: 1

Related Questions