How to acces stardog cloud with cli on windows?
Hi Bilal,
After logging in to your Stardog Cloud account and connecting to your Stardog instance, you can create a user in the Studio application.
You will also need to install the CLI tools on Windows: Windows (Deprecated) | Stardog Documentation Latest
Once you have created a user/password and you have the CLI tools installed, you can access your cloud instance via the CLI. We provide more info here: Accessing API Endpoint | Stardog Documentation Latest
Regards,
Paul
Hello Paul,
Thank you for your reply.
I successfully installed the service, but when I try to start it I got this error:
Regarding this command:
stardog-admin --server https://[custom-name].stardog.cloud:5820 -u < admin-user> db list
What should I put instead of admin-user? the username created?
(I have JAVA version "11.0.18")
You do not need to start the Stardog server on you local system. Your Stardog Free endpoint is already running in Stardog Cloud.
If you want to run stardog-admin
to send a command to your cloud endpoint, then you will need an admin user. The easiest way to create an admin user that you can use with the CLI is to create a new user (for example, cli_admin
) in Studio and then assign the cloud
role to that user.
Assuming the name of your Free endpoint is sd-12345678
, you could then run the command stardog-admin --server https://sd-12345678.stardog.cloud:5820 db list -u cli_admin
to get a list of your databases. Note that the order of parameters in my example is slightly different from that in the doc that I referenced. It looks like we have a typo in that example. Your best bet when using the CLI is to use the CLI doc reference (for example, db list | Stardog Documentation Latest).
In general, it is a best practice to not create such powerful users that can be accessed via username/password. If possible, I recommend doing all your admin-level work (like creating databases) in Studio, and then creating a user with the least privileges possible that can be used with the stardog
CLI command (for example, for executing queries).