Install a catalog plugin
const url = 'https://example.com/api/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plugins';const options = { method: 'POST', headers: { cookie: '__Host-shardkeep_session=<__Host-shardkeep_session>', 'Content-Type': 'application/json' }, body: '{"pluginId":"example","versionId":"example","force":false}'};
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/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plugins \ --header 'Content-Type: application/json' \ --cookie __Host-shardkeep_session=<__Host-shardkeep_session> \ --data '{ "pluginId": "example", "versionId": "example", "force": false }'Needs plugins.install; audited. Installs a catalog plugin (the given version, or the newest compatible one) and
the required dependencies it does not have yet, each at its newest compatible version. Jars are downloaded from
their publisher and verified against the catalog first; nothing changes if any of that fails. The server must be
READY and run Paper or Purpur. A version not marked for the server’s Minecraft version (plugin_incompatible),
or a required dependency missing from the catalog (plugin_dependency_missing), is refused unless force is
set; a version for other software (plugin_wrong_platform) always is.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
The newest compatible version when absent.
Responses
Section titled “Responses”Installed; takes effect when the server next starts.
object
The plugins installed or updated, the requested one first.
object
The installation’s ID.
The catalog plugin ID, or upload:<name> for an uploaded jar.
False for uploads.
False when it was installed with force, or is an upload.
True when it was installed because another plugin requires it.
Plugin IDs of installed plugins that require this one.
Set when the catalog’s denylist names this version.
object
The newest catalog version compatible with the server, when it is newer than this one.
object
Required dependencies that are not in the catalog (only with force).
Example
{ "changed": [ { "pluginId": "modrinth:Vebnzrzj", "source": "CATALOG" } ]}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"}Not found, or not visible to you.
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"}Clashes with existing data or state.
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"}A jar could not be downloaded from its publisher, or did not match its published checksum (download_failed).
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"}The catalog has not been synced yet (catalog_unavailable).
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.