Skip to main content
POST
Create repository
This endpoint is experimental. Its request and response formats may change.

Authorizations

Authorization
string
header
required

Authorization code flow with PKCE-S256. RFC 8628 device flow is also supported.

Body

application/json
name
string
required
Minimum string length: 1
clusterHost
string

Public host of the cluster to pin the repo to (e.g. royalcanin.partial.to); must be in the project's processing cell. Empty takes that cell's cluster.

mirrorClusterSlugs
string[]

Clusters to add native mirrors on once the repo is active. Core stores them with the create and retries each until its mirror exists.

Maximum array length: 16
objectFormat
enum<string>

Hash format; defaults to sha1.

Available options:
sha1,
sha256
projectId
string

Project to create the repo in. Required for an account. A plugin installation's token may omit it; the repo then goes in the installation's project, and any other project answers 404.

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Response

Created

capabilities
object
required
id
string
required
name
string
required
owningProjectId
string
required
provider
enum<string>
required
Available options:
github,
entire
$schema
string<uri>
read-only

A URL to the JSON Schema for this object.

Example:

"/api/v1/schemas/CreatedRepo.json"

candidate
object
clusterHost
string
clusterSlug
string
commitToken
string
deprecated

Deprecated: read the X-Entire-Commit-Token response header instead.

detachedAt
string<date-time>
foreign
boolean
fullName
string
jurisdiction
string
lastPushedAt
string<date-time>
mirrorClusterSlugs
string[]

Native-mirror clusters core stored with this create. Their status is on GET /repos/{repoId}/native-mirrors.

mirrorSuspended
boolean
mirrorSuspendedAt
string
nativeMirrors
object[]

Native mirrors this create queued, each pending with its reserved placementId. Their status is on GET /repos/{repoId}/native-mirrors.

objectFormat
enum<string>
Available options:
sha1,
sha256
path
string
placements
object[]
primaries
object
provisionAttempts
integer<int64>
provisionReason
string
repoGroupId
string
repositoryId
string

Public repository id (repo_ followed by a ULID). Plugin installation routes, access tokens and webhooks use it.

state
enum<string>

Provisioning lifecycle. A mirror is active from creation, before its initial clone completes. A native primary reports deleting while a cascade delete removes its native mirrors; poll until 404.

Available options:
provisioning,
active,
failed,
deleting
visibility
enum<string>
Available options:
public,
private