Web-API - Provides an admin panel and API for your Minecraft server


#1

This is a discussion topic for the Ore project, Web-API. View the full project on Ore for downloads and more information.


Web-API

Web-API is a RESTful API to access & manage your Sponge Minecraft server.
It also offer an AdminPanel to manage your server through a web interface.

Default server runs on localhost port 8080.

Screenshots

Features

Provides an AdminPanel to manage your minecraft server and a RESTful webserver with:

  • General information about the server
  • History for
    • Chat
    • Commands
  • WebHooks that execute
    • on minecraft events (like players joining, chat, death, etc.)
    • when calling certain command (supports parameters)
    • on custom events (e.g. from other plugins)
  • List, inspect, manipulate, create, delete:
    • Players
    • Worlds
    • Entities
    • Tile entities
    • Plugins
    • Blocks
  • Information about loaded classes
  • Arbitrary command execution (like using the server console)
  • Custom serializers to determine how data is turned into JSON
  • Permissions for each endpoint

Integrations

This plugins offers integrations (provides an API endpoint and/or a page in the admin panel) for the following plugins:

Source

Can be found on Github

Downloads

You can download the plugin right here on Ore!
Or you can go to Github

Docs / Tutorials

I started working on some short tutorials which you can find here

Support

You can leave a message in the channel here, private message me on the forums here, message me on discord @ Valandur#3581 or join the Web-API discord server with this invite link

External connections

Web-API uses bStats to track plugin usage (Starting with v4.4.0)
It also contains sentry.io, which automatically reports errors. Error reports do NOT contain your server ip or any othe personal information.

Both these features can be turned off; bStats has it’s own config file and sentry can be turned off in the main config file config.conf by setting reportErrors = false

Issues

Please report them here

Donations

Are obviously not required but very appreciated, can be done here


[SOLVED]How to connect webstie to SpongeForge server
Web-API [v4] - AdminPanel & RESTful web server [now with screenshots!]
[SOLVED]How to connect webstie to SpongeForge server
[Request] JSON API for server / command + feedback via http
JSONAPI Sponge for 1.12.2
Web-API [v4] - AdminPanel & RESTful web server [now with screenshots!]
#2

A new version has been released for Web-API, it is available for download here.


Access Minecraft through a Web API


#3

A new version has been released for Web-API, it is available for download here.


Access Minecraft through a Web API


#4

A new version has been released for Web-API, it is available for download here.


  • Add ability to execute commands with an arbitrary name
  • Add command history to view past executions of commands

  • Fix rate limit handler


#5

I got some problems with the rate limit. It is set up to 100 commands per second for the admin account, but actually once the server started you can send one command, after that you'll always hit the rate limit.

Config:
default {
permissions=[
info
]
rateLimit=10
}
keys=[
{
key=abcde12345
permissions=[
"*"
]
rateLimit=100
}
]
useBlacklist=true
useWhitelist=false
whitelist=[
"0.0.0.0"
]


#6

HI @Mitsouko, thanks for reporting this. I am aware of this issue and it has been fixed for the next release, which should come out this weekend.


#7

Hi @Valandur,
I tried "webapi-1.9-sponge-6.0.0-SNAPSHOT.jar" and it worked (MC 1.10.2). I forgot to report this in time (what was about half an hour after I wrote my post). Sorry about that.


#8

Interesting, but glad it works! New version is coming out either way though :stuck_out_tongue:


#9

A new version has been released for Web-API, it is available for download here.


v2.0.1
- Fix commands without descriptions causing plugin crash

v2.0
- Added webhooks
- Use jackson json instead of gson
- Rework config handling
- Rework/Remove raw endpoint


#10

A new version has been released for Web-API, it is available for download here.


v2.0.1
- Fix commands without descriptions causing plugin crash

v2.0
- Added webhooks
- Use jackson json instead of gson
- Rework config handling
- Rework/Remove raw endpoint


#11

A new version has been released for Web-API, it is available for download here.


  • Add player_join, player_leave and command webhook endpoints
  • Add support for form-urlencoded requests for webhooks
  • Fix errors on entity death events
  • Fix docs endpoint

#12

A new version has been released for Web-API, it is available for download here.


  • Add player_join, player_leave and command webhook endpoints
  • Add support for form-urlencoded requests for webhooks
  • Fix errors on entity death events
  • Fix docs endpoint

#13

A new version has been released for Web-API, it is available for download here.


  • Add ALL, PLAYER_KICK and PLAYER_BAN hooks
  • Add hook aliases
  • Add examples for swagger docs
  • Add class name and parent class name to /class endpoint

#14

A new version has been released for Web-API, it is available for download here.


  • Add ALL, PLAYER_KICK and PLAYER_BAN hooks
  • Add hook aliases
  • Add examples for swagger docs
  • Add class name and parent class name to /class endpoint

#15

By chance, could you add some routes ? I would love to have /chest /sign and /block

Also, I don't find how to access player inventory using route /player/uuid, can someone help me ?


#16

Hey @Keuterio I'm currently working on some new routes.

  1. I believe /chest and /sign already exist, those are both tile entities, and are listed in /tile-entity.

  2. What exactly would you want from /block? information about one specific block at a location, or more like, the location of all diamond blocks?

  3. I have added the player inventory to the default output of the /player/uuid route in the upcoming v3 of the plugin.


#17

Thanks for this complete answer, I couldn't use webapi with Sponge 5.2 but it was all ok with 5.1. I don't plan to switch to API 6 soon.

1) Great, I have to try out in a better querying page, the answer is definitely in /tile-entity :slight_smile:

2) I would like to get and set a block but my goal sounds more like a schematic pasting : I want to save an array of blocks and replace it with an other one.

3) can't wait for v3 ! Will it be for API 5.2 ?

Edit : I can't find about web-hook, where is it in the doc ?


#18

A new version has been released for Web-API, it is available for download here.


  • Add /block endpoint to query & set blocks in the world
  • Rework endpoints to provide more consistent and better structured data
  • Add fine grained permission nodes for commands run via /cmd endpoint
  • Add 100% more error messages for endpoints

#19

A new version has been released for Web-API, it is available for download here.


  • Add /block endpoint to query & set blocks in the world
  • Rework endpoints to provide more consistent and better structured data
  • Add fine grained permission nodes for commands run via /cmd endpoint
  • Add 100% more error messages for endpoints

#20

@Keuterio

2) Added in version 3

3) I targeted Sponge 6.0 and 5.2 in v3. The 5.2 version should also work for 5.1.

Check https://forums.spongepowered.org/t/web-api-restful-web-server-v2-0/15717/55 for more information