Skip to content
marensovich edited this page Sep 14, 2025 · 15 revisions

Welcome to the Pterolib wiki!

Here you can learn how to start using the Pterolib library

Below you can select sections in which you can learn how to obtain the information necessary for the library's operation.

Quickstart

  • Installation

    • Gradle

dependencies {
    implementation 'me.marensovich:pterolib:1.0.0'
}
    • Maven

<dependency>
    <groupId>me.marensovich</groupId>
    <artifactId>pterolib</artifactId>
    <version>1.0.0</version>
</dependency>
  • Creating your first class with Pterolib

    • Using ClientAPI

public class Main {

    public static final String PANEL_ADDRESS = System.getenv("PANEL_ADDRESS");
    public static final String PANEL_CLIENT_API = System.getenv("PANEL_CLIENT_API");

    public static void main(String[] args){
        // Client initialization
        PteroClient pteroClient = new PteroClient(PANEL_ADDRESS, PANEL_CLIENT_API);
        try {
            System.out.println(
                    // Getting server details by its ID
                    pteroClient.getServerManagement().getServerDetails("Your server ID")
            );
        } catch (Exception e) { throw new RuntimeException(e); }
    }
}

Tip

PANEL_TOKEN you should get in your panel. More

    • Using ApplicationAPI

In development, stay tuned for updates

Tip

You can use ClientAPI and ApplicationAPI modules in the same project.

FAQ

What is the difference between ClientAPI and ApplicationAPI

How to get a key for ClientAPI

Open your panel site img.png Click on your account icon img_1.png Select the "API Credentials" tab img_2.png Fill out the required form and click "CREATE" img_3.png

Note

The number of characters in the description must be more than 4

Caution

When creating a key, write it down immediately. It will be impossible to view the full key again.

How to get a key for ApplicationAPI

In development, stay tuned for updates

Clone this wiki locally