Working with Raw

CodeScoring.Save stores arbitrary files in hosted repositories in Raw format: archives, binary builds, documentation, and other artifacts without a package manager. Uploads and downloads use standard HTTP requests.

Creating a Repository

In the web UI, open a project, click Create repository, and select Format: Raw / Generic and Type: Hosted. Common fields are described in Repository Management.

The same repository can be created through the API:

curl -X POST https://save.example.com/api/v1/repos \
  -H "Content-Type: application/json" \
  -u "<username>:<password>" \
  -d '{
    "project": "backend",
    "name": "raw-hosted",
    "format": "raw",
    "repository_type": "hosted"
  }'

Uploading Files

The web interface has no upload button: files are uploaded only over HTTP. Upload a file with a PUT request to the path where it should be available in the repository:

curl -u "<username>:<password>" \
  -T file.bin \
  "https://save.example.com/cs-save/raw/<project>/raw-hosted/releases/file.bin"

Package Name, Version, and Architecture

You can provide metadata as query parameters in the upload URL:

ParameterPurposeIf omitted
namePackage name, for example my-packageThe filename is used
versionPackage version, for example 1.2.3The server assigns a version
architectureArchitecture, for example x86_64Remains unspecified

All parameters are optional. The version is a string and does not have to follow SemVer. Metadata does not change the file path.

Binary PUT:

curl -u "<username>:<password>" -X PUT \
  "https://save.example.com/cs-save/raw/<project>/raw-hosted/releases/file.bin?name=my-package&version=1.2.3&architecture=x86_64" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @file.bin

Multipart:

curl -u "<username>:<password>" -X PUT \
  "https://save.example.com/cs-save/raw/<project>/raw-hosted/releases/file.bin?name=my-package&version=1.2.3&architecture=x86_64" \
  -F "file=@file.bin"

In a multipart request, metadata also goes in the URL, while the file goes in the file field. URL-encode parameter values: for example, team/my-package → team%2Fmy-package, 1.2.3+build.7 → 1.2.3%2Bbuild.7. Empty or repeated parameters return 400.

Repeated uploads

History retention depends on the server's enable_versioning setting for Raw. With history enabled, uploading the same path and version again returns 409. With history disabled, PUT replaces the current file. A locked file (Lock artifact) cannot be overwritten.

Robot accounts in CI

For CI/CD, use Basic Auth with a robot account: username sa$<robot-name>, password — the API key. See Authentication.

Downloading Files

In the web interface, select the file in the repository tree and click Download in the right pane.

Over HTTP, use the same path without upload parameters:

curl -u "<username>:<password>" \
  -o file.bin \
  "https://save.example.com/cs-save/raw/<project>/raw-hosted/releases/file.bin"

Checking Metadata

The upload response includes the name, version, architecture (if specified), path, size, and checksum. Stored artifacts can be found through the API with name and version filters:

curl -u "<username>:<password>" \
  "https://save.example.com/api/v1/artifacts?repository_id=<repository-id>&name=my-package&version=1.2.3"

<repository-id> is the numeric repository ID returned by the repository creation API.

Was this page helpful?