Skip to main content

SDK publishing

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: sdk-publishing · 6 operations

POST /v1/projects/{tenant_slug}/{project_ref}/sdk-publish​

Publish a version's SDK package to npm or PyPI (dry run by default)

Builds the package a consumer would npm install / pip install from one published revision and, unless dryRun is false, uploads it with the tenant's stored registry credential.

The version number is derived, not chosen. It is major.minor.<regen counter>, where major.minor come from the revision's version line and the counter is how many releases that line's release series has already had. Re-publishing the same line bumps the patch; a new line starts a new series. A prerelease line stays a prerelease (1.5.0-beta.2 on npm, 1.5.0b2 on PyPI). A line with no leading number cannot be mapped and is refused.

A dry run is the same work minus the upload. It resolves the credential (proving it is present and still decryptable), computes the version the next real publish would claim, builds the archive and reports its SHA-256 and contents. The build is byte-deterministic, so the digest a dry run reports is the digest a publish uploads.

Provenance is embedded in the package's own metadata — package.json's apiome object, PyPI's Project-URL entries — naming the revision id, the version line, the release series and the generator, so an installed package traces back to its spec.

Requires versions:publish, for a dry run too. Audited as sdk.package_publish.

Operation id: publish_project_sdk_v1_projects__tenant_slug___project_ref__sdk_publish_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for publish a version's sdk package to npm or pypi (dry run by default).

Responses

StatusDescriptionBody
200Successful response for publish a version's sdk package to npm or pypi (dry run by default).application/json SdkPublishRunModel
400Unsupported ecosystem, or the revision is not published.—
404Project or version not found in this tenant.—
409No free version number: another publish of this series is in flight.—
422No package name is configured, the version line cannot be mapped, no usable credential is stored, or there is nothing to package.—
503No credential-encryption key is configured on this deployment.—

GET /v1/projects/{tenant_slug}/{project_ref}/sdk-publish-runs​

List a project's package publish history

Every publish attempt, newest first — dry runs included, because a dry run is the record of what a release would have been.

Requires versions:view.

Operation id: list_project_publish_runs_v1_projects__tenant_slug___project_ref__sdk_publish_runs_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
ecosystemquerystring or nullnoNarrow to one ecosystem (npm or pypi).
limitqueryintegernoMaximum number of rows to return.
offsetqueryintegernoNumber of rows to skip before returning results.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list a project's package publish history.application/json SdkPublishRunListResponse
404Project not found in this tenant.—
422Validation Errorapplication/json HTTPValidationError

GET /v1/projects/{tenant_slug}/{project_ref}/sdk-publish-runs/{run_id}​

Read one publish run

The run's outcome, the version it claimed and its event log. The log is stored redacted — a registry error quoting the credential it rejected is replaced before it is written.

Requires versions:view.

Operation id: get_project_publish_run_v1_projects__tenant_slug___project_ref__sdk_publish_runs__run_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
run_idpathstringyesPath parameter identifying the run id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read one publish run.application/json SdkPublishRunModel
404Project or run not found in this tenant.—
422Validation Errorapplication/json HTTPValidationError

GET /v1/projects/{tenant_slug}/{project_ref}/sdk-registry-credentials​

List the credentials a project would publish with

Both the workspace credentials and this project's overrides, workspace first, so a reader can see what is being overridden.

A credential is write-only: this API stores the token encrypted at rest and never returns it. What comes back is its public scheme prefix (npm_, pypi-), its length and a truncated SHA-256 — enough to confirm which token is stored, not enough to use it.

A project credential replaces the workspace one for that ecosystem. Unlike SDK-3.4's generation settings, credentials do not merge field by field: a token is atomic.

Ecosystems: npm, pypi. gomod is absent because a Go module is released by pushing a tag (SDK-4.2), not by uploading to a registry.

registryUrl defaults to the ecosystem's public registry and must be https:// — a publish token sent over plain HTTP is a token disclosed.

Requires projects:view.

Operation id: list_project_registry_credentials_v1_projects__tenant_slug___project_ref__sdk_registry_credentials_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list the credentials a project would publish with.application/json RegistryCredentialListResponse
404Project not found in this tenant.—
422Validation Errorapplication/json HTTPValidationError

PUT /v1/projects/{tenant_slug}/{project_ref}/sdk-registry-credentials/{ecosystem}​

Store this project's credential for one registry

Replaces the workspace credential for this project and ecosystem, whole.

A credential is write-only: this API stores the token encrypted at rest and never returns it. What comes back is its public scheme prefix (npm_, pypi-), its length and a truncated SHA-256 — enough to confirm which token is stored, not enough to use it.

A project credential replaces the workspace one for that ecosystem. Unlike SDK-3.4's generation settings, credentials do not merge field by field: a token is atomic.

Ecosystems: npm, pypi. gomod is absent because a Go module is released by pushing a tag (SDK-4.2), not by uploading to a registry.

registryUrl defaults to the ecosystem's public registry and must be https:// — a publish token sent over plain HTTP is a token disclosed.

Requires projects:edit. Audited as governance.sdk_registry_credential.update.

Operation id: put_project_registry_credential_v1_projects__tenant_slug___project_ref__sdk_registry_credentials__ecosystem__put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
ecosystempathstringyesPath parameter identifying the ecosystem segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for store this project's credential for one registry.

Responses

StatusDescriptionBody
200Successful response for store this project's credential for one registry.application/json RegistryCredentialOut
404Project not found in this tenant.—
422The token, registry URL or ecosystem is not acceptable.—
503No credential-encryption key is configured on this deployment.—

DELETE /v1/projects/{tenant_slug}/{project_ref}/sdk-registry-credentials/{ecosystem}​

Remove this project's credential for one registry

The project falls back to the workspace credential, if there is one.

Requires projects:edit. Audited as governance.sdk_registry_credential.clear.

Operation id: delete_project_registry_credential_v1_projects__tenant_slug___project_ref__sdk_registry_credentials__ecosystem__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
ecosystempathstringyesPath parameter identifying the ecosystem segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for remove this project's credential for one registry.application/json object
404Project not found in this tenant.—
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

RegistryCredentialListResponse​

The credentials configured for one scope.

Attributes: schema_version: The projection's shape. scope: The scope that was addressed. encryption_configured: Whether this deployment can store credentials at all. ecosystems: Which ecosystems can be published to. credentials: One entry per stored credential, tenant-wide first.

PropertyTypeRequiredDescription
schemaVersionstringnoSchema Version.
scopestringyesScope.
encryptionConfiguredbooleanyesEncryption Configured.
ecosystemsarray of stringyesEcosystems.
credentialsarray of RegistryCredentialOutyesCredentials.

RegistryCredentialOut​

A stored credential, described without being revealed.

Attributes: schema_version: The projection's shape. ecosystem: npm or pypi. scope: tenant or project. project_id: The project this credential belongs to, when it is a project override. registry_url: Where it publishes. token_prefix: The public scheme prefix the token declares, when it declares one. token_length: How many characters the stored token has. token_fingerprint: A truncated SHA-256 of the token, for confirming a rotation. key_version: Which master key sealed it. readable: Whether the stored token can currently be decrypted. False means the key that sealed it is not configured — the credential is present but unusable, and saying so beats a publish failing with a decryption error. created_at: When it was first stored. updated_at: When it was last replaced. updated_by: Who last replaced it.

PropertyTypeRequiredDescription
schemaVersionstringnoSchema Version.
ecosystemstringyesnpm or pypi.
scopestringyestenant or project.
projectIdstring or nullnoProject ID.
registryUrlstringyesRegistry URL.
tokenPrefixstring or nullnoToken Prefix.
tokenLengthinteger or nullnoToken Length.
tokenFingerprintstring or nullnoToken Fingerprint.
keyVersioninteger or nullnoKey Version.
readablebooleannoReadable.
createdAtstring (date-time) or nullnoCreated At.
updatedAtstring (date-time) or nullnoUpdated At.
updatedBystring or nullnoUpdated By.

RegistryCredentialPutRequest​

Body for storing a registry credential.

Attributes: token: The plaintext registry token. Sealed before it is written and never returned. registry_url: Where to publish; defaults to the ecosystem's public registry.

PropertyTypeRequiredDescription
tokenstringyesThe registry token — an npm automation token or a PyPI API token. Stored envelope-encrypted; never returned by any route.
registryUrlstring or nullnoRegistry endpoint. Defaults to npm → https://registry.npmjs.org, pypi → https://upload.pypi.org/legacy/. Must be https://.

SdkPublishRequest​

Body for a publish (or a dry run).

Attributes: ecosystem: npm or pypi. version: The revision to publish — a revision UUID or a version label. Defaults to the project's latest revision. dry_run: When true (the default), everything is resolved and built and nothing is uploaded.

PropertyTypeRequiredDescription
ecosystemstringyesnpm or pypi.
versionstring or nullnoRevision UUID or version label. Defaults to the latest revision.
dryRunbooleannoValidate without publishing. Defaults to true: uploading to a public registry is irreversible, so it is always the deliberate choice.

SdkPublishRunListResponse​

A page of publish history.

Attributes: runs: The rows, newest first. total: How many rows match. limit: The page size used. offset: The offset used.

PropertyTypeRequiredDescription
runsarray of SdkPublishRunModelyesRuns.
totalintegeryesTotal.
limitintegeryesLimit.
offsetintegeryesOffset.

SdkPublishRunModel​

One publish run.

Attributes: run_id: The ledger row. status: dry_run, in_progress, published, already_published or failed. dry_run: Whether anything was uploaded. ecosystem: npm or pypi. package_name: The resolved package name. package_version: The version claimed. release_series: The series the counter was allocated under. regen_counter: Which release of that series this is. version_line: The version label the package version was derived from. registry_url: Where it published (or would have). credential_scope: Which scope supplied the credential. artifact_filename: The archive's filename. artifact_sha256: The archive's digest. artifact_bytes: The archive's size. operation_count: How many operations shipped snippets. truncated: Whether the API has more operations than one package carries snippets for. skipped: Operations no snippet is defined for. files: What is inside the archive (a dry run's report; empty for a stored run). provenance: The provenance embedded in the package's own metadata. log: The publish event log, redacted of secrets. error_code: Set when the run failed. error_message: Set when the run failed.

PropertyTypeRequiredDescription
runIdstring or nullnoRun ID.
statusstringyesStatus.
dryRunbooleanyesDry Run.
ecosystemstringyesEcosystem.
packageNamestringyesPackage Name.
packageVersionstringyesPackage Version.
releaseSeriesstringyesRelease Series.
regenCounterintegeryesRegen Counter.
versionLinestring or nullnoVersion Line.
registryUrlstring or nullnoRegistry URL.
credentialScopestring or nullnoCredential Scope.
artifactFilenamestring or nullnoArtifact Filename.
artifactSha256string or nullnoArtifact Sha256.
artifactBytesinteger or nullnoArtifact Bytes.
operationCountintegernoNumber of operation.
truncatedbooleannoTruncated.
skippedarray of map of stringnoSkipped.
filesarray of objectnoFiles.
provenanceobjectnoProvenance.
logarray of objectnoLog.
errorCodestring or nullnoError Code.
errorMessagestring or nullnoError Message.