Getting Started

Learn how to connect to the Alarik Internal API for programmatic management of users, buckets, and objects.

The Internal API allows programmatic management of Alarik resources like users, buckets, and objects. It's used by the web console and can be integrated into your automation workflows.

The Internal API accesses the SQLite database directly instead of the optimized caching layer. For uploading/downloading objects, prefer the S3-compatible API for better performance.

Authentication

Authenticate using the same Access Key and Secret Key you use for the S3 API. Pass them as HTTP headers:

HeaderDescription
X-Access-KeyYour access key ID
X-Secret-KeyYour secret access key

Base URL

All Internal API endpoints use the base URL:

{API_BASE_URL}/api/v1

Endpoint Types

The API is divided into two categories:

Admin Endpoints

Require admin privileges. Manage all users and buckets system-wide.

Base path: /api/v1/admin/*

User Endpoints

Work on the authenticated user's own resources.

Base path: /api/v1/*

Example Request

curl -X GET "{API_BASE_URL}/api/v1/admin/users" \
  -H "X-Access-Key: AKIAIOSFODNN7EXAMPLE" \
  -H "X-Secret-Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"

Pagination

List endpoints return paginated responses:

{
    "metadata": {
        "page": 1,
        "per": 10,
        "total": 42
    },
    "items": [...]
}

Use query parameters to navigate:

page
integer
Page number (default: 1)
per
integer
Items per page (default: 10)