Dashboard

Raw Packages

Raw packages provide simple HTTP-based file storage for generic artifacts. Any file type can be uploaded and downloaded using straightforward PUT and GET requests -- no protocol-specific tooling required. This makes Raw ideal for binaries, configuration files, build outputs, and anything that does not fit into npm, Maven, or Swift packaging.

Replace ORGSLUG and REPOSLUG with your actual organization and repository slugs in every example below.

Uploading

Upload a file by PUTting the binary content to a path that includes the package name, version, and filename:

curl -X PUT \
  -H "Authorization: Bearer art_your_token" \
  --data-binary @myfile.zip \
  https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package/1.0.0/myfile.zip
  • The package is created automatically on first upload if it does not already exist.
  • You can upload multiple files under the same package name and version (e.g., platform-specific binaries).
  • Uploading requires a token with write scope.
  • A successful upload returns HTTP 201.

Upload with explicit content type

By default, Artifacts infers the content type from the file extension on download. You can also set it explicitly:

curl -X PUT \
  -H "Authorization: Bearer art_your_token" \
  -H "Content-Type: application/gzip" \
  --data-binary @build-output.tar.gz \
  https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-tool/2.0.0/build-output.tar.gz

Downloading

Download a file with a simple GET request:

curl -O https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package/1.0.0/myfile.zip

Tip: For public repositories, no authentication is required for downloads. Private repos require a valid token:

curl -O \
  -H "Authorization: Bearer art_your_token" \
  https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package/1.0.0/myfile.zip

The response includes a Content-Disposition: attachment header and a content type derived from the file extension.

Listing Versions

Retrieve the list of available versions for a package:

curl -H "Authorization: Bearer art_your_token" \
  https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package

Response:

{
  "name": "my-package",
  "latestVersion": "1.0.0",
  "versions": [
    {
      "version": "1.0.0",
      "publishedAt": "2026-02-16T14:30:00.000Z",
      "size": 12345
    }
  ]
}

Versions API

A lightweight API to query published versions -- useful for scripts and CI pipelines that need to fetch the latest release automatically.

JSON (default)

curl -s https://artifacts.premex.se/api/v/ORGSLUG/REPOSLUG/my-package/versions

Response:

{
  "package": "my-package",
  "latest": "1.2.0",
  "versions": [
    { "version": "1.2.0", "publishedAt": "2026-03-10T12:00:00.000Z", "size": 54321 },
    { "version": "1.1.0", "publishedAt": "2026-02-20T09:00:00.000Z", "size": 51234 }
  ]
}

Plain text

Add ?format=txt to get one version per line (newest first). Combine with ?limit=N to control how many versions are returned.

# All versions, one per line
curl -s https://artifacts.premex.se/api/v/ORGSLUG/REPOSLUG/my-package/versions?format=txt

# Latest version only
curl -s https://artifacts.premex.se/api/v/ORGSLUG/REPOSLUG/my-package/versions?format=txt\&limit=1

Download latest version automatically

Combine the versions API with a download command to always fetch the newest release:

VERSION=$(curl -s https://artifacts.premex.se/api/v/ORGSLUG/REPOSLUG/my-tool/versions?format=txt\&limit=1)
curl -O https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-tool/$VERSION/my-tool-linux-amd64

This works for any package type, not just raw. The endpoint is:

GET /api/v/{org}/{repo}/{package}/versions
    ?format=txt|json    (default: json)
    &limit=N            (default: all)

Public repos require no authentication. Private repos require a valid Bearer token.

Deleting Files

Delete a specific file (requires admin scope):

curl -X DELETE \
  -H "Authorization: Bearer art_your_token" \
  https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package/1.0.0/myfile.zip

Use Cases

Raw packages work well for artifacts that do not have a dedicated package manager:

  • Compiled binaries -- distribute CLI tools, daemons, or native libraries for multiple platforms
  • Configuration files -- share environment configs, feature flag definitions, or schema files across services
  • Build artifacts -- store build outputs (e.g., .tar.gz, .zip, .deb, .apk) for deployment pipelines
  • Large assets -- host data files, machine learning models, or media assets that are too large for git
  • Platform-specific installers -- distribute .dmg, .msi, or .AppImage installers

Example: multi-platform binary distribution

# Upload platform-specific binaries under the same package and version
curl -X PUT -H "Authorization: Bearer $ARTIFACTS_TOKEN" \
  --data-binary @my-tool-linux-amd64 \
  https://artifacts.premex.se/api/raw/myorg/myrepo/my-tool/1.0.0/my-tool-linux-amd64

curl -X PUT -H "Authorization: Bearer $ARTIFACTS_TOKEN" \
  --data-binary @my-tool-darwin-arm64 \
  https://artifacts.premex.se/api/raw/myorg/myrepo/my-tool/1.0.0/my-tool-darwin-arm64

curl -X PUT -H "Authorization: Bearer $ARTIFACTS_TOKEN" \
  --data-binary @my-tool-windows-amd64.exe \
  https://artifacts.premex.se/api/raw/myorg/myrepo/my-tool/1.0.0/my-tool-windows-amd64.exe

CI/CD Example

A GitHub Actions workflow that uploads a build artifact after a release:

name: Publish Release Artifact

on:
  release:
    types: [published]

jobs:
  upload:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build
        run: make build

      - name: Upload to Artifacts
        run: |
          curl -f -X PUT \
            -H "Authorization: Bearer ${{ secrets.ARTIFACTS_TOKEN }}" \
            --data-binary @dist/my-tool-linux-amd64 \
            "https://artifacts.premex.se/api/raw/myorg/myrepo/my-tool/${GITHUB_REF_NAME}/my-tool-linux-amd64"

The ${GITHUB_REF_NAME} variable expands to the release tag (e.g., 1.0.0), which becomes the version in the Raw package path.

Troubleshooting

401 Unauthorized

  • Verify your token is valid and has not expired. Check Settings > API Tokens in the web UI.
  • Ensure the Authorization header uses the Bearer prefix: Authorization: Bearer art_....

403 Forbidden

  • Uploading requires write scope. Deleting requires admin scope. Verify your token has the necessary permissions.
  • If the token is restricted to specific repositories, ensure it includes the target repo.

404 Not Found

  • Check that the org slug and repo slug in the URL are correct.
  • Verify the package name, version, and filename exist. You can check the web UI for the list of packages.

Upload returns 400 Bad Request

  • Ensure the request body is not empty. Use --data-binary @filename (not --data or -d, which strips newlines).
  • Check that the URL path includes all required segments: package name, version, and filename.

Large file uploads time out

For very large files, consider increasing curl's timeout:

curl --max-time 600 -X PUT \
  -H "Authorization: Bearer art_your_token" \
  --data-binary @large-file.tar.gz \
  https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package/1.0.0/large-file.tar.gz