Link Search Menu Expand Document
Start for Free

Accessing API Endpoint

Access your Stardog instance’s REST API endpoint.

Page Contents
  1. Best practices for API access
  2. Installing Stardog with CLI tools
    1. CLI tools macOS Homebrew
    2. CLI tools Debian Based Systems
    3. CLI tools RPM Based systems
    4. CLI tools Amazon Linux
    5. CLI tools for Windows

In addition to using the Stardog Applications, you can access your Stardog instance via its REST API endpoint directly at:

https://[custom-name].stardog.cloud:5820

Access to the API endpoint is done via HTTP basic authentication over SSL. The API endpoint can be accessed via the administrative CLI tool stardog-admin and data access CLI tool stardog. For complete reference documentation on these tools refer to the Stardog Admin CLI Reference and Stardog CLI Reference. Once you have the CLI installed you can use it to manage your Stardog instance. For example to list databases:

​​$ stardog-admin --server https://[custom-name].stardog.cloud:5820  db list

Best practices for API access

The following are our recommendations for accessing Stardog with an API:

  1. The admin user should create an account in their Stardog instance specifically for API access.
  2. This dedicated account should be distinct from other user accounts.
  3. The account should be granted the fewest privileges required to perform its tasks.

To see more about creating users, see Managing Users and Roles.

Installing Stardog with CLI tools

For full instructions on installing Stardog on your preferred operating system, see Install Stardog.

CLI tools macOS Homebrew

To install Stardog via Homebrew, use the following command:

​​$ brew install stardog-union/tap/stardog

Homebrew will take care of the installation for you including adding Stardog’s /bin folder to your PATH so that the stardog and stardog-admin commands can be used regardless of the current working directory.

CLI tools Debian Based Systems

To install Stardog CLI using apt-get run the following commands:

$ curl http://packages.stardog.com/stardog.gpg.pub | apt-key add
$ echo "deb http://packages.stardog.com/deb/ stable main" >> /etc/apt/sources.list
$ apt-get update
$ apt-get install -y stardog[=<version>]

This will first add the Stardog gpg key to the systems and then fetch and install the latest Stardog deb package.

Stardog binaries should now be in the /opt/stardog directory.

CLI tools RPM Based systems

To install Stardog using yum run the following commands:

$ curl http://packages.stardog.com/rpms/stardog.repo > /etc/yum.repos.d/stardog.repo
$ yum install -y stardog[-<version>]

Stardog binaries should now be in the /opt/stardog directory.

CLI tools Amazon Linux

Certain Amazon EC2 instances do not let you redirect output into /etc/yum.repos.d as specified above. On such instances you can install Stardog like so:

$ sudo yum-config-manager --add-repo http://packages.stardog.com/rpms/stardog.repo
$ sudo yum-config-manager --enable stardog
$ yum install -y stardog[-<version>]

CLI tools for Windows

  1. Download the distribution.

  2. Unzip the file and open a command prompt. Tools are located in bin/ directory