Skip to content

Validates a Git, registered-workspace, or uploaded archive source and publishes an immutable skills revision, creating or updating a pack.

POST
/v1/m/skills/packs/{id}/revisions
curl --request POST \
--url https://example.com/v1/m/skills/packs/example/revisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--data '{ "name": "example", "source": { "directory": "example", "expected_digest": "example", "kind": "git", "ref": "example", "subdir": "example", "url": "example", "workspace_ref": "example" } }'

Validates a Git, registered-workspace, or uploaded archive source and publishes an immutable skills revision, creating or updating a pack.

id
required
string

Path parameter id.

Idempotency-Key
required
string
>= 1 characters <= 128 characters /^[!-~]+$/
X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

JSON imports a Git, registered-workspace or built-in catalog source. Archive uploads also accept multipart/form-data with archive (binary), format (zip or tar.gz), name (required for a new pack), and optional expected_digest. The same Idempotency-Key header is required.

Media type application/json
object
name

Required and nonblank for a new pack; at most 128 bytes. Revisions retain the recorded pack name.

string
source
required
One of:
object
directory

Selected relative directory in the registered workspace. Empty for Git imports.

string
expected_digest

Optional expected SHA-256 of the selected source snapshot.

string
kind
required
Allowed value: git
ref
required

Git branch, tag, or commit to resolve; for a built-in pack, its identifier in the pinned catalog. Empty for workspace imports.

string
subdir

Optional selected Git directory. Empty for workspace imports.

string
url
required

Git HTTPS URL without credentials, query, or fragment. Empty for workspace and built-in imports.

string
workspace_ref

Registered workspace UUID. Empty for Git imports.

string

OK

Media type application/json
object
Example generated
{}

Bad request

Media type application/json
object
Example generated
{}

Unauthenticated

Media type application/json
object
Example generated
{}

Forbidden

Media type application/json
object
Example generated
{}

Not found

Media type application/json
object
Example generated
{}

Conflict / setup required

Media type application/json
object
Example generated
{}

Rate limited

Media type application/json
object
Example generated
{}