Hi. I have a free Stardog cloud account and have difficulty connecting to the endpoint that is available to me. When I run the command below I receive an Authentication Failure error message. Since I do not have control/access to the endpoint, I do not know if authentication is based on a username & password or some other form. Currently, I am attempting to access the endpoint via my Stardog cloud account's username/password.
I put a placeholder for the server's endpoint address & user name; the password prompt appears when executing the command. The 'nw' is a reference to a Stardog database at the endpoint.
Although you're already signed in to Stardog Cloud in the browser, programmatic access works differently. The CLI (and PyStardog) authenticate with a username and password and they cannot reuse your browser SSO session. So create a dedicated API user on your endpoint.
Create an API User
Open Studio IDE and select the Security icon in the left sidebar.
Click + to create a new user.
Enter a username and password, then click Add.
Your new user has no permissions yet. Stardog uses a default-deny RBAC model meaning access is denied unless explicitly granted. To give your API some privileges, assign it, for example, the built-in cloud role.
Assign thecloudRole
In the Users panel, select your new user.
Click Assign Role and select cloud.
Verify Access
You should now have your endpoint URL, username, and password. To confirm connectivity, open the following URL in your browser: {ENDPOINT}/catalog
eg https://sd-5eb9e7de.stardog.cloud:5820/catalog*
*
(This will access the nonamed graph of the catalog database.)
Sign in with your new API credentials when prompted. A successful response returns @prefix lines at the top this confirms your endpoint is reachable and your credentials are valid.