Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 3.9 KB

File metadata and controls

74 lines (50 loc) · 3.9 KB
sidebar_position 1
title Introduction
description An introduction to the MCSS API

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

:::caution Work In Progress This section of the documentation is a work in progress. It is not complete and may change at any time.
The API is still in development. It is NOT perfect and will be improved in the future. :::

:::info This guide is aimed at developers The following tips and information is aimed at developers wanting to create apps that utilize the API. If you are a regular user this may not be for you. As such some steps will assume that you already have basic knowledge of how API calls work and that you can read a documentation. :::

Since version 12, MCSS supports an API that allows you to interact with your servers remotely.
If you have any feature requests for the API, feel free to send them over on Discord.

What does it do {#-api-about}

The API allows you to control MCSS remotely. As of right now you can :

  • Run power actions - Start, Stop, Restart or Kill your servers
  • Send commands - run minecraft commands in the console
  • Return server information like the icon, status and description
  • Scheduler CRUD operations (create, read, update & delete tasks)

Enabling it {#-api-enable}

For your safety and to preserve resources, the API is disabled by default.

To enable it, open the settings file > options and scroll all the way down. Tick the box labeled Enable Web API.

Managing API keys {#-api-keys}

On the Web Panel page you will see a button labeled Manage Users & API Keys.
From this window you will be able to create an API key.

Screenshot of the Remote Access Manager window, ready to create an API key

Screenshot of the Remote Access Manager window, where an API key has been created

If you lose your key, you must delete & create a new key. Keep your key private & secure!

Making API calls {#-api-calls}

In order to make API calls you need special software.

Standalone Software {#-standalone-software}

Standalone software allow you to make API calls from a nice interface. These softwares support everything you need, from simple HTTP requests to advanced features like authentication. Free forever, with unlimited calls and APIs. You can add up to three people to your team to share your work with them. You can download postman here Free forever, with unlimited calls and APIs. You can share your work with as many people as you want. You can download Insomnia here

IDE extensions {#-ide-extensions}

If you plan on writing code that leverages the API, you may want to use an IDE extension. Visual Studio Code being the most popular, here are a few options for it.

This option is more hands-on, requiring you to write all your requests. But it gives you more control and a more concise interface. You can download it here

The cleanest of the two options, with a dedicated window similar to Insomnia's UI. You can download this extension here

API Endpoints {#-api-endpoints}

View all implemented endpoints.