Skip to content

API and Adapter Route Reference

This page is the documentation-oriented route map for Publaryn 1.0. It is not an OpenAPI replacement; it exists to show the mounted surface area and the baseline responsibilities of each route group.

Control-plane surface

The management API lives under /v1/* and is paired with public liveness, readiness, and protocol mounts.

Prefix or routePurpose
/v1/auth/*Registration, login, logout, MFA, and account security flows
/v1/users/*User profile and user package views
/v1/orgs/*Organization profile, membership, teams, audit, security, repositories, and packages
/v1/org-invitations/*Invitation inbox plus accept/decline actions
/v1/namespaces/*Namespace claim creation, transfer, deletion, and lookup
/v1/repositories/*Repository creation, reads, updates, transfer, and package listings
/v1/packages/*Package, release, artifact, tag, security-finding, and trusted-publisher workflows
GET /v1/searchVisibility-aware package search
/v1/tokens*Scoped API token issuance, listing, and revocation
GET /v1/auditPlatform audit log for platform administrators
/v1/admin/jobs*Filtered operator queue visibility, stale-lock recovery, and safe failed-job retry
GET /v1/statsPublic top-level platform statistics
GET /healthLiveness probe
GET /readinessReadiness probe backed by PostgreSQL and optional Redis connectivity
GET /swagger-uiInteractive OpenAPI/Swagger UI for the management API

Control-plane workflow hotspots

The following endpoint groups define the main 1.0 user journeys:

  • Authentication and account security: register, login, logout, TOTP MFA, recovery codes, and scoped token management.
  • Governance: organizations, invitations, teams, delegated package access, repository access, namespace access, and ownership transfer flows.
  • Delegated access history: organization admins can inspect and export audit-backed package, repository, and namespace access changes through GET /v1/orgs/{slug}/access-history and GET /v1/orgs/{slug}/access-history/export.
  • Package lifecycle: package creation, package metadata and visibility updates, release creation, artifact upload, publish, yank, unyank, deprecate, tags, security-finding triage, and trusted publisher configuration.
  • Package detail analysis: package and release detail reads now also return Bundlephobia-inspired analysis metadata derived from stored artifacts and ecosystem-specific dependency metadata where available.
  • Operations: platform statistics, operator queue visibility, audit export, security export, and health probes.

Organization governance additions in 1.1.0

RoutePurpose
GET /v1/orgs/{slug}/access-historyList delegated package, repository, and namespace access changes from organization audit
GET /v1/orgs/{slug}/access-history/exportExport the same access-history view as CSV for compliance review

The access-history routes accept optional scope, team, target, date-range, page, and page-size filters. They reuse the organization audit authorization model and do not create a second access ledger.

Native protocol adapter mounts

Each adapter is mounted in the main API router under a fixed prefix.

npm / Bun — /npm

RoutePurpose
GET /npm/-/v1/searchnpm-compatible search
GET /npm/-/package/{package}/dist-tagsList dist-tags
PUT /npm/-/package/{package}/dist-tags/{tag}Set dist-tag
DELETE /npm/-/package/{package}/dist-tags/{tag}Delete dist-tag
GET /npm/{scope}/{name}Scoped package packument
PUT /npm/{scope}/{name}Scoped package publish
GET /npm/{scope}/{name}/-/{filename}Scoped tarball download
GET /npm/{package}Unscoped package packument
PUT /npm/{package}Unscoped package publish
GET /npm/{package}/-/{filename}Unscoped tarball download

PyPI / pip — /pypi plus /_/oidc/*

RoutePurpose
GET /_/oidc/audienceReturn the audience string for trusted publishing
POST /_/oidc/mint-tokenExchange an external OIDC JWT for a short-lived Publaryn token
GET /pypi/simple and GET /pypi/simple/Simple API root
GET /pypi/simple/{project} and GET /pypi/simple/{project}/Project detail in the Simple API
GET /pypi/files/{artifact_id}/{filename}Distribution download
POST /pypi/legacy and POST /pypi/legacy/Default legacy upload endpoint
POST /pypi/legacy/{repository_slug} and trailing-slash variantRepository-targeted legacy upload

Cargo — /cargo/index and /cargo/api/v1

Sparse index mount: /cargo/index

RoutePurpose
GET /cargo/index/config.jsonCargo registry config
GET /cargo/index/1/{name}1-character crate index entry
GET /cargo/index/2/{name}2-character crate index entry
GET /cargo/index/3/{prefix}/{name}3-character crate index entry
GET /cargo/index/{ab}/{cd}/{name}4+ character crate index entry

Web API mount: /cargo/api/v1

RoutePurpose
PUT /cargo/api/v1/crates/newPublish a crate
DELETE /cargo/api/v1/crates/{name}/{version}/yankYank a version
PUT /cargo/api/v1/crates/{name}/{version}/unyankRestore a yanked version
GET /cargo/api/v1/crates/{name}/ownersList owners
PUT /cargo/api/v1/crates/{name}/ownersAdd owners
DELETE /cargo/api/v1/crates/{name}/ownersRemove owners
GET /cargo/api/v1/cratesSearch crates
GET /cargo/api/v1/crates/{name}/{version}/downloadDownload crate archive

NuGet — /nuget

RoutePurpose
GET /nuget/v3/index.jsonNuGet service index
PUT /nuget/v2/packagePush package
DELETE /nuget/v2/package/{id}/{version}Unlist package
POST /nuget/v2/package/{id}/{version}Relist package
GET /nuget/v3-flatcontainer/{id}/index.jsonVersion listing
GET /nuget/v3-flatcontainer/{id}/{version}/{filename}Package download
GET /nuget/v3/registration/{id}/index.jsonRegistration index
GET /nuget/v3/searchSearch

Maven — /maven

RoutePurpose
GET /maven/{*path}Repository reads, including metadata and checksum materialization
PUT /maven/{*path}Deploy-style artifact and metadata upload

The Maven adapter uses path-aware handling for maven-metadata.xml, checksum reads, and deploy-compatible uploads behind the shared catch-all route.

RubyGems — /rubygems

RoutePurpose
GET /rubygems/api/v1/gems/{name}Gem metadata
GET /rubygems/api/v1/versions/{name}Version listing
GET /rubygems/gems/{filename}Gem download
POST /rubygems/api/v1/gemsPush gem
DELETE /rubygems/api/v1/gems/yankYank gem
POST /rubygems/api/v1/api_keyAPI key echo/validation

Composer — /composer

RoutePurpose
GET /composer/packages.jsonComposer packages index
GET /composer/p/{vendor}/{package}Package metadata
GET /composer/files/{artifact_id}/{filename}Distribution download
PUT /composer/packages/{vendor}/{package}Publish package metadata/version
DELETE /composer/packages/{vendor}/{package}/versions/{version}Yank a package version

OCI — /oci

RoutePurpose
GET /oci/v2/OCI API probe
GET /oci/v2/_catalogRepository catalog
GET, HEAD, PUT, POST, PATCH, DELETE /oci/v2/{*path}Distribution-spec dispatch for manifests, blobs, uploads, tags, and referrers

Dual-licensed under Apache-2.0 and MIT.