API Reference - ToolBoxV2 Registry¶
Base URL: https://registry.simplecore.app/api/v1
Version: 1.1
Authentication: Bearer Token (JWT via CloudM.Auth)
Inhaltsverzeichnis¶
- Authentication
- Packages
- Artifacts
- Publishers
- Search
- Versions (Update-Ping)
- Dependency Resolution
- Diff (Incremental Updates)
- Admin
- Health
- Error Codes
Authentication¶
Get Current User¶
Response (200 OK):
{
"id": "usr_abc123",
"cloudm_user_id": "usr_abc123",
"email": "user@example.com",
"username": "username",
"is_admin": false,
"publisher_id": "pub_xyz789"
}
Hinweis: Users werden automatisch beim ersten Login erstellt.
Get Publisher Info¶
Response (200 OK):
{
"id": "pub_xyz789",
"name": "my-publisher",
"display_name": "My Publisher",
"verification_status": "verified"
}
Register as Publisher¶
POST /api/v1/auth/register-publisher
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "my-publisher",
"display_name": "My Publisher",
"email": "contact@example.com",
"homepage": "https://example.com"
}
Response (201 Created):
{
"id": "pub_new123",
"name": "my-publisher",
"display_name": "My Publisher",
"verification_status": "unverified"
}
Packages¶
List Packages¶
Query Parameters:
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| page | integer | 1 | Page number |
| per_page | integer | 20 | Items per page (1-100) |
| package_type | string | - | Filter: mod, library, artifact, theme, plugin |
Response (200 OK):
{
"packages": [
{
"name": "CloudM",
"display_name": "CloudM Module",
"package_type": "mod",
"description": "Cloud management module",
"latest_version": "2.0.0",
"total_downloads": 1234
}
],
"total": 1,
"page": 1,
"per_page": 20
}
Get Package¶
Response (200 OK):
{
"name": "CloudM",
"display_name": "CloudM Module",
"package_type": "mod",
"description": "Cloud management module",
"latest_version": "2.0.0",
"total_downloads": 1234,
"homepage": "https://github.com/MarkinHaus/ToolBoxV2",
"repository": "https://github.com/MarkinHaus/ToolBoxV2.git"
}
Create Package¶
POST /api/v1/packages
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "my-mod",
"display_name": "My Awesome Mod",
"description": "This mod does awesome things",
"package_type": "mod"
}
Response (201 Created):
Update Package¶
PATCH /api/v1/packages/{name}
Authorization: Bearer <token>
Content-Type: application/json
{
"description": "Updated description",
"visibility": "public"
}
Delete Package¶
Response (204 No Content)
Upload Package Version¶
POST /api/v1/packages/{name}/upload
Authorization: Bearer <token>
Content-Type: multipart/form-data
file: <binary>
version: "1.0.0"
changelog: "Initial release"
cURL Example:
curl -X POST https://registry.simplecore.app/api/v1/packages/my-mod/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@my-mod-1.0.0.zip" \
-F "version=1.0.0" \
-F "changelog=Initial release"
Get Download URL¶
GET /api/v1/packages/{name}/versions/{version}/download
Authorization: Bearer <token> (required for private/unlisted)
Response (200 OK):
Download-Berechtigungen: - Public: Jeder kann downloaden - Unlisted: Nur authentifizierte User - Private: Nur der Owner
Yank Version¶
POST /api/v1/packages/{name}/versions/{version}/yank
Authorization: Bearer <token>
Content-Type: application/json
{
"reason": "Critical security bug"
}
Artifacts¶
Artifacts sind kompilierte Binaries und Apps (z.B. SimpleCore Desktop, TB CLI).
Artifact Types¶
| Type | Beschreibung |
|---|---|
tauri_app |
Tauri Desktop Application |
cli_executable |
CLI Binary |
browser_extension |
Browser Extension |
mobile_app |
Mobile App |
library |
Compiled Library |
List Artifacts¶
Create Artifact¶
POST /api/v1/artifacts
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "SimpleCore",
"artifact_type": "tauri_app",
"description": "SimpleCore Desktop Application",
"homepage": "https://simplecore.app"
}
Get Artifact¶
Upload Build¶
POST /api/v1/artifacts/{name}/builds
Authorization: Bearer <token>
Content-Type: multipart/form-data
version: "1.0.0"
platform: "windows"
architecture: "x64"
changelog: "Initial release"
installer_type: "msi"
min_os_version: "10.0"
file: <binary>
cURL Example:
curl -X POST https://registry.simplecore.app/api/v1/artifacts/SimpleCore/builds \
-H "Authorization: Bearer $TOKEN" \
-F "version=1.0.0" \
-F "platform=windows" \
-F "architecture=x64" \
-F "installer_type=msi" \
-F "file=@SimpleCore-1.0.0-win-x64.msi"
Platforms: all, windows, linux, macos, android, ios
Architectures: all, x64, x86, arm64, arm32
Get Latest Build for Platform¶
Response (200 OK):
{
"version": "1.0.0",
"released_at": "2025-02-25T10:00:00Z",
"changelog": "Initial release",
"build": {
"platform": "windows",
"architecture": "x64",
"filename": "SimpleCore-1.0.0-win-x64.msi",
"size_bytes": 25600000,
"checksum_sha256": "def456..."
}
}
Get Build Download URL¶
Response (200 OK):
{
"url": "https://minio.simplecore.app/bucket/SimpleCore-1.0.0.msi?signature=...",
"expires_in": 3600
}
Publishers¶
List Publishers¶
Get Publisher¶
Response (200 OK):
{
"id": "pub_xyz789",
"name": "my-publisher",
"display_name": "My Publisher",
"verification_status": "verified",
"package_count": 5,
"total_downloads": 50000
}
Submit Verification Request¶
POST /api/v1/publishers/verify
Authorization: Bearer <token>
Content-Type: application/json
{
"method": "github",
"data": {
"username": "mygithub"
}
}
Response (202 Accepted):
Search¶
Search Packages¶
Response (200 OK):
{
"results": [
{
"name": "discord-mod",
"display_name": "Discord Integration",
"description": "Integrate with Discord",
"latest_version": "1.0.0",
"total_downloads": 100
}
],
"total": 1,
"query": "discord",
"page": 1,
"per_page": 20
}
Search Suggestions¶
Response (200 OK):
Versions (Update-Ping)¶
Batch-Abfrage der neuesten Versionen — genutzt von ToolBoxV2 für Update-Checks.
Response (200 OK):
Leere names → gibt alle Packages zurück.
Dependency Resolution¶
Resolve Dependencies¶
POST /api/v1/resolve
Content-Type: application/json
{
"requirements": ["CloudM>=2.0.0", "discord-mod>=1.0.0"],
"toolbox_version": "0.1.25"
}
Response (200 OK):
{
"success": true,
"resolved": {
"CloudM": {
"name": "CloudM",
"version": "2.0.0",
"download_url": "https://...",
"checksum": "abc123..."
}
},
"conflicts": [],
"warnings": []
}
Check Compatibility¶
Response (200 OK):
Diff (Incremental Updates)¶
Diffs ermöglichen inkrementelle Updates — nur die Änderungen zwischen zwei Versionen werden übertragen.
Get Diff Info¶
Response (200 OK):
{
"package_name": "CloudM",
"from_version": "1.0.0",
"to_version": "2.0.0",
"patch_size": 12345,
"full_size": 98765,
"compression_ratio": 0.125,
"patch_storage_path": "diffs/CloudM/1.0.0-2.0.0.patch",
"patch_checksum": "abc123..."
}
Download Diff Patch¶
Create Diff (Pre-generation)¶
Admin¶
Alle Admin-Endpoints erfordern is_admin = true.
List Pending Publishers¶
Verify Publisher¶
POST /api/v1/packages/admin/{publisher_id}/verify
Authorization: Bearer <admin-token>
Content-Type: application/json
{"notes": "Verified via API"}
Reject Publisher¶
POST /api/v1/packages/admin/{publisher_id}/reject
Authorization: Bearer <admin-token>
Content-Type: application/json
{"notes": "Reason for rejection"}
Revoke Verification¶
POST /api/v1/packages/admin/{publisher_id}/revoke
Authorization: Bearer <admin-token>
Content-Type: application/json
{"notes": "Reason for revocation"}
Health¶
Health Check¶
Response (200 OK):
Readiness Check¶
Response (200 OK):
Error Codes¶
| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid request parameters |
| 401 | UNAUTHORIZED | Missing or invalid authentication |
| 403 | FORBIDDEN | Insufficient permissions / Admin required |
| 404 | NOT_FOUND | Resource not found |
| 409 | CONFLICT | Resource already exists |
| 422 | UNPROCESSABLE_ENTITY | Validation error |
| 500 | INTERNAL_ERROR | Server error |
Error Response Format¶
Rate Limiting¶
Current Limits: - Anonymous: 100 requests/hour - Authenticated: 1000 requests/hour - Admin: No limit
Rate Limit Headers:
Examples¶
Python (httpx)¶
import httpx
async def get_packages():
async with httpx.AsyncClient() as client:
response = await client.get("https://registry.simplecore.app/api/v1/packages")
return response.json()
async def upload_package(token: str, file_path: str):
async with httpx.AsyncClient() as client:
with open(file_path, "rb") as f:
response = await client.post(
"https://registry.simplecore.app/api/v1/packages/my-mod/upload",
headers={"Authorization": f"Bearer {token}"},
files={"file": f},
data={"version": "1.0.0"}
)
return response.json()
cURL¶
# List packages
curl https://registry.simplecore.app/api/v1/packages
# Get package
curl https://registry.simplecore.app/api/v1/packages/CloudM
# Upload package version
curl -X POST https://registry.simplecore.app/api/v1/packages/my-mod/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@my-mod.zip" \
-F "version=1.0.0"
# Check for updates (batch)
curl "https://registry.simplecore.app/api/v1/versions?names=CloudM&names=discord-mod"
# Upload artifact build
curl -X POST https://registry.simplecore.app/api/v1/artifacts/SimpleCore/builds \
-H "Authorization: Bearer $TOKEN" \
-F "version=1.0.0" \
-F "platform=linux" \
-F "architecture=x64" \
-F "file=@simplecore-linux-x64.deb"
Letzte Aktualisierung: 2026-04-28 API Version: 1.1