Frontend/documentation/server/preview.md

45 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2024-04-21 04:47:52 +00:00
---
2024-04-22 19:07:53 +00:00
title: Server Preview
2024-04-21 04:47:52 +00:00
summary: Get the server list preview of a Minecraft server.
---
2024-04-22 19:07:53 +00:00
# Overview
2024-04-21 04:47:52 +00:00
The server preview endpoint allows you to get the server list preview of a Minecraft server.
## Endpoint
```
GET /server/:platform/preview/:query
```
## Platforms
| Platform | Description |
|----------|-----------------|
| bedrock | Bedrock Edition |
| java | Java Edition |
## Parameters
| Parameter | Description | Required |
|-----------|---------------------------------------------------------------------------|----------|
| platform | The platform of the server you want to get the preview for. | Yes |
| query | The IP address or hostname of the server you want to get the preview for. | Yes |
## Example
```bash
curl -X GET "https://api.mcutils.xyz/server/java/preview/hypixel.net" -H "accept: image/png"
```
## Response
![Server Icon](https://api.mcutils.xyz/server/java/preview/play.hypixel.net)
## Errors
| Status Code | Description |
|-------------|-----------------------------------------------|
| 400 | The server was not found. |
| 429 | The Mojang API rate limit has been exhausted. |