Upload a server jar
const url = 'https://example.com/api/v1/artifacts?template=vanilla&version=example&javaVersion=17';const options = { method: 'POST', headers: { cookie: '__Host-shardkeep_session=<__Host-shardkeep_session>', 'Content-Type': 'application/java-archive' }, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 binaryGlobal 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The Java feature release the jar needs (17, 21 or 25).
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Stored.
object
Empty for software without builds (Vanilla) or uploads without one.
Lowercase hex SHA-256 of the jar.
UPSTREAM was downloaded from the publisher; UPLOAD was uploaded by an administrator.
Checked against the checksum the publisher published. Uploads never are.
Example
{ "source": "UPSTREAM"}The request is invalid.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Not signed in, or the credentials are invalid.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Signed in, but not allowed.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Shardkeep is free software under the AGPL-3.0. Minecraft is a trademark of Mojang AB; Shardkeep is not affiliated with or endorsed by Mojang or Microsoft.