CodeSync REST API
Fast, GDPR-compliant package infrastructure for Germany
Available Endpoints
Programmatic access to package publishing, version resolution, and dependency auditing. All responses return JSON with strict schema validation.
GET /packages/{scope}/{name}
Retrieve full metadata for a registered package. Returns version history, maintainer details, and integrity checksums. Supports the depth query parameter for shallow or full dependency trees.
POST /packages/publish
Upload a new package version. Requires a signed tarball payload and a valid Bearer token. Automatically triggers CI validation and publishes to the Frankfurt edge cache within 15 seconds.
DELETE /packages/{scope}/{name}/versions/{tag}
Unlist a specific package version. Maintains audit logs for compliance. Requires admin scope and a 24-hour grace period before permanent removal.
GET /registry/sync/status
Monitor replication health across EU data centers. Returns real-time latency metrics, failed package counters, and next scheduled sync window.
Authentication & Rate Limits
Access the CodeSync registry using API keys generated from your dashboard. All requests must include a valid Bearer token in the Authorization header.
Base URL: https://api.codesync.de/v1. Standard rate limits are 1,200 requests per hour for free tiers and 12,000 requests per hour for enterprise accounts. Tokens expire after 90 days and can be rotated without interrupting active deployments. Include your project slug in the X-Project-ID header for multi-tenant environments.
Integration Examples
Copy-paste ready snippets for CI/CD pipelines and local development workflows.
cURL: Fetch Package Metadata
curl -X GET https://api.codesync.de/v1/packages/@acme-utils/core \ -H "Authorization: Bearer sk_live_8f3a9c2d..." \ -H "X-Project-ID: prod-de-fra"
Node.js: Publish Workflow
const tarball = fs.readFileSync('dist/package-1.2.0.tgz'); const res = await fetch('https://api.codesync.de/v1/packages/publish', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}` }, body: tarball });
GitHub Actions: Sync Check
- name: Verify Registry Health run: | STATUS=$(curl -s https://api.codesync.de/v1/registry/sync/status | jq -r .status) [ "$STATUS" != "healthy" ] && exit 1
Need SDK support? The official @codesync/sdk package handles retries, pagination, and automatic token rotation. Install via npm i @codesync/sdk or yarn add @codesync/sdk.