Skip to content

Upload a server jar

POST
/artifacts
curl --request POST \
--url 'https://example.com/api/v1/artifacts?template=vanilla&version=example&javaVersion=17' \
--header 'Content-Type: application/java-archive' \
--cookie __Host-shardkeep_session=<__Host-shardkeep_session> \
--data binary

Global administrators only; audited. Stores the request body (at most 512 MiB) as an unverified artifact for a template and version. With -offline, uploads are the only software source: provisioning uses the newest upload for the server’s template and version (and build, when the server names one). Uploading the same bytes again returns the existing artifact.

template
required
string
Allowed values: vanilla paper purpur folia velocity
version
required
string
>= 1 characters <= 64 characters /^[0-9][0-9.]*$/
build
string
<= 64 characters /^[0-9]*$/
javaVersion
required
integer
Allowed values: 17 21 25

The Java feature release the jar needs (17, 21 or 25).

Media typeapplication/java-archive
string format: binary

Stored.

Media typeapplication/json
object
id
required
string format: uuid
template
required
string
version
required
string
build
required

Empty for software without builds (Vanilla) or uploads without one.

string
javaVersion
required
integer
sha256
required

Lowercase hex SHA-256 of the jar.

string
sizeBytes
required
integer format: int64
source
required

UPSTREAM was downloaded from the publisher; UPLOAD was uploaded by an administrator.

string
Allowed values: UPSTREAM UPLOAD
verified
required

Checked against the checksum the publisher published. Uploads never are.

boolean
createdAt
required
string format: date-time
Example
{
"source": "UPSTREAM"
}

The request is invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Not signed in, or the credentials are invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Signed in, but not allowed.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}