API Documentation
RESTful API for SiFli Package Registry API
Quick Links
Introduction
The SiFli Package Registry API API provides programmatic access to browse packages, trigger synchronization, and manage API tokens. All endpoints return JSON responses.
Base URL: https://your-domain.com/api/v1
Authentication
Some API endpoints require authentication using Bearer tokens
Public Endpoints
The following endpoints do not require authentication:
- GET /api/v1/packages
- GET /api/v1/packages/:name
- GET /api/v1/packages/stats/categories
Protected Endpoints
For protected endpoints, include your API token in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://your-domain.com/api/v1/syncCreating an API Token
To create an API token:
- Sign in with GitHub OAuth
- Navigate to your profile and click "API Tokens"
- Click "Generate New Token"
- Copy and save your token (it won't be shown again)
Packages API
Browse and search for packages
/api/v1/packagesGet a paginated list of packages with optional filtering.
Query Parameters
page (optional, default: 1) - Page numberlimit (optional, default: 20, max: 100) - Items per pagecategory (optional) - Filter by categorysearch (optional) - Search querycurl "https://your-domain.com/api/v1/packages?page=1&limit=10&category=AI_ML"/api/v1/packages/:nameGet detailed information about a specific package.
curl "https://your-domain.com/api/v1/packages/package-name"Synchronization API
Trigger and monitor data synchronization (Requires authentication)
/api/v1/syncProtectedTrigger a full synchronization from JFrog Artifactory.
curl -X POST \
-H "Authorization: Bearer YOUR_API_TOKEN" \
https://your-domain.com/api/v1/sync/api/v1/sync/:idProtectedGet the status of a specific sync operation.
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://your-domain.com/api/v1/sync/sync-uuidAPI Tokens Management
Create and manage your API tokens (Requires login)
/api/v1/tokensProtectedCreate a new API token.
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"name": "CI/CD Token",
"expiresIn": 90
}' \
https://your-domain.com/api/v1/tokens/api/v1/tokensProtectedList all your API tokens (token values are not returned).
/api/v1/tokens/:idProtectedRevoke an API token.
Error Responses
Standard error response format
All errors follow this format:
{
"error": "Error message",
"statusCode": 400,
"details": {} // Optional additional details
}Common Status Codes
200 - Success400 - Bad Request401 - Unauthorized404 - Not Found500 - Internal Server Error