Skip to content
Coritan Docs

Organization API: Customer Portal: Server icon

The 4 Organization API operations for server icon.

View as Markdown

Part of Customer Portal.

Method Path Summary
GET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon The server's Minecraft server icon, server-icon.png in the server root
POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon Convert a picture to the 64×64 PNG Minecraft accepts and save it as /server-icon.png
DELETE /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon Delete /server-icon.png
POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon/preview Render a picture as a server icon in every fit mode, without saving it

The server's Minecraft server icon, server-icon.png in the server root

Section titled The server's Minecraft server icon, server-icon.png in the server root

GET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon

The server's Minecraft server icon, server-icon.png in the server root.

present says whether the file is there, and icon is the picture as a data URI when it is a readable image of 256 KB or less. format, width, height and bytes describe it, and valid says whether the game shows it: Minecraft only shows a PNG of exactly 64×64 pixels. problems names what is wrong with any other file (not_png, wrong_size, unreadable, too_large or is_directory). support.supported is false on a Bedrock server or another game, which have no server list icon. Needs file.read.

Name In Type Required
uuid path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Convert a picture to the 64×64 PNG Minecraft accepts and save it as /server-icon.png

Section titled Convert a picture to the 64×64 PNG Minecraft accepts and save it as /server-icon.png

POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon

Convert a picture to the 64×64 PNG Minecraft accepts and save it as /server-icon.png.

Send the picture as the multipart field file (up to 10 MB, as for the preview) and the fit mode as fit. The file replaces any icon already there. The game reads it when the server starts, so restart the server to show it. The answer is the saved icon as a data URI with valid: true. Needs file.create. A file that is not a picture or an unknown fit answers 400, and one over 10 MB answers 413.

Name In Type Required
uuid path string yes
org_slug path string yes

multipart/form-data (required)

Field Type Required Description
file string (binary) yes
fit string no How to square a picture that is not square: cover, contain or stretch.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon

Delete /server-icon.png.

The server list shows the default icon after the next restart. Needs file.delete.

Name In Type Required
uuid path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Render a picture as a server icon in every fit mode, without saving it

Section titled Render a picture as a server icon in every fit mode, without saving it

POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/server-icon/preview

Render a picture as a server icon in every fit mode, without saving it.

Send the picture as the multipart field file, up to 10 MB. PNG, JPEG, GIF, WebP, BMP, TIFF, ICO and most other image formats are read; SVG is refused, so export it as a PNG first. variants holds one 64×64 PNG data URI per fit mode: cover crops the edges to fill the square, contain keeps the whole picture with transparent edges and stretch squashes it. suggested_fit is contain for a transparent picture that is not square and cover otherwise, and source describes the upload. Needs file.create. A file that is not a picture answers 400, and one over 10 MB answers 413.

Name In Type Required
uuid path string yes
org_slug path string yes

multipart/form-data (required)

Field Type Required
file string (binary) yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.