As a first set of feedback running the first query from the docs using docker
DATA="INFO FOR DB;"
curl --request POST \--header"Content-Type: application/json"\--header"NS: test"\--header"DB: test"\--user"root:root"\--data"${DATA}"\
http://localhost:8000/sql
results in
{"code":403,"details":"Authentication failed","description":"Your authentication details are invalid. Reauthenticate using valid authentication parameters.","information":"There was a problem with authentication"}
I'm pretty sure this should be fixable with a tiny bit of thinking, but it would be nice if the first example "just worked" :)
I'm a developer, software engineer, and the founder of SurrealDB. I have an interest in databases, with a focus on distributed databases, and highly-available architectures.
Hi @peteole ! Did you start the server with --user root and --pass root arguments (to set the root username and password? Then the --user "root:root" curl argument will authenticate with this username and password.
There is also a new surreal sql command which starts a REPL, which is much easier to use than the curl command (we'll update the documentation soon using this REPL, but in the meantime you can see how to use the tool here: surrealdb.com/docs/cli/sql).
We've got many improvements coming to the docs very soon, and all feedback is extremely useful, so thank you!
I'm a developer, software engineer, and the founder of SurrealDB. I have an interest in databases, with a focus on distributed databases, and highly-available architectures.
As mentioned above, we have many improvements coming to the docs soon, so thank you for the feedback ✅! Also, in the meantime, if you notice anything else, or have trouble understanding anything at all, just let us know on here or any of our other community platforms 😀!
As a first set of feedback running the first query from the docs using docker
results in
I'm pretty sure this should be fixable with a tiny bit of thinking, but it would be nice if the first example "just worked" :)
Hi @peteole ! Did you start the server with
--user root
and--pass root
arguments (to set the root username and password? Then the--user "root:root"
curl argument will authenticate with this username and password.There is also a new
surreal sql
command which starts a REPL, which is much easier to use than the curl command (we'll update the documentation soon using this REPL, but in the meantime you can see how to use the tool here: surrealdb.com/docs/cli/sql).We've got many improvements coming to the docs very soon, and all feedback is extremely useful, so thank you!
Nope, I was just copying the command from the website:)
Hi @peteole at the top of the page under the 'Start the server' section it should give the arguments for starting the server with a default root user.
As mentioned above, we have many improvements coming to the docs soon, so thank you for the feedback ✅! Also, in the meantime, if you notice anything else, or have trouble understanding anything at all, just let us know on here or any of our other community platforms 😀!
This should do there trick: